##### R CODE TO REPLICATE THE FIGURES AND TABLES INCLUDED IN 
##### Juan Pablo Micozzi and Adrian Lucardi, "How Valuable Is a Legislative Seat? Incumbency Effects in the Argentine Chamber of Deputies." Forthcoming in Political Science Research and Methods


## saving the output to a log file
sink (file="Log Replication How Valuable Is a Legislative Seat.txt", append=FALSE, type="output", split=FALSE)


## Loading the required R packages. Make sure to have them installed before proceeding. In order to install a package called X, write install.packages("X")
library (car)
library (dplyr)
library (ggplot2)
library (gridExtra)
library (rddensity)
library (rdrobust)
library (rdpower)
library (sandwich)
library (xtable)


## display options
options (digits=4, scipen=6, show.signif.stars=FALSE, tibble.width=Inf, tibble.print_max=Inf)


## graphical parameters
n.digit <- 2

(aspect.ratio <- 1.45/1)
plotWidth <- 345
plotWidth/aspect.ratio

e <- 0.5
cex.def <- 2
cline <- "deeppink4"
cdot <- "darkcyan"





#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
#### Downloading and preparing the data ####
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#

baseFull <- read.csv ("Argentina Legislative candidates 1983-2015.csv", sep=",", header=T)

# re-factorizing
baseFull$election <- factor (baseFull$election)
baseFull$district <- factor (baseFull$district)
baseFull$period <- factor (baseFull$period)
baseFull$list <- factor (baseFull$list)
baseFull$name <- factor (baseFull$name)
baseFull$magStatus <- factor (baseFull$magStatus)
baseFull$assumed_wt <- baseFull$elected_wt
baseFull$largeProv <- with (baseFull, ifelse (district=="BUE" | district=="CABA" | district=="SFE" | district=="CBA", 1, 0))
baseFull$equalMag <- with (baseFull, ifelse (largeMag==0 & odd==0, 1, 0))

# running variable as proposed by RT
baseFull$running_RT <- with (baseFull, ifelse (nextIn==0 & nextOut==0, NA, ifelse (nextIn==1, addVoteSh_RT*(-100), subVoteSh_RT*100)))

# creating factors indicating position in party list
baseFull$position2 <- with (baseFull, ifelse (position<=5, paste ("position0", position, sep="")
                                              , ifelse (position <=10, "position0610"
                                                        , ifelse (position<=15, "position1115", "position16+"
                                                        ))))
baseFull$position2 <- ordered (baseFull$position2)
summary (baseFull[baseFull$position2=="position01",c ("position", "posRelat")])
summary (baseFull[baseFull$position2=="position02",c ("position", "posRelat")])
summary (baseFull[baseFull$position2=="position03",c ("position", "posRelat")])
summary (baseFull[baseFull$position2=="position04",c ("position", "posRelat")])
summary (baseFull[baseFull$position2=="position05",c ("position", "posRelat")])
summary (baseFull[baseFull$position2=="position0610",c ("position", "posRelat")])
summary (baseFull[baseFull$position2=="position1115",c ("position", "posRelat")])
summary (baseFull[baseFull$position2=="position16+",c ("position", "posRelat")])  ## all's well

# position2sh -> 1:4,5+ only (few instances of close elections with 5)
baseFull$position2sh <- with (baseFull, ifelse (position<=4, paste ("position0", position, sep=""), "position05+"))
baseFull$position2sh <- factor (baseFull$position2sh)
baseFull$position01 <- with (baseFull, ifelse (position2sh=="position01", 1, 0))
baseFull$position02 <- with (baseFull, ifelse (position2sh=="position02", 1, 0))
baseFull$position03 <- with (baseFull, ifelse (position2sh=="position03", 1, 0))
baseFull$position04 <- with (baseFull, ifelse (position2sh=="position04", 1, 0))
baseFull$position05 <- with (baseFull, ifelse (position2sh=="position05+", 1, 0))

# position2mag -> position2sh + district magnitude -> the same position may mean something different in district with small or large magnitudes
baseFull$position2mag <- with (baseFull, factor (paste (position2sh, "_mag", mag, sep="")))
baseFull$position01mag2 <- with (baseFull, ifelse (position2mag=="position01_mag2", 1, 0))
baseFull$position01mag3 <- with (baseFull, ifelse (position2mag=="position01_mag3", 1, 0))
baseFull$position01mag4 <- with (baseFull, ifelse (position2mag=="position01_mag4", 1, 0))
baseFull$position01mag5 <- with (baseFull, ifelse (position2mag=="position01_mag5", 1, 0))
baseFull$position01mag9 <- with (baseFull, ifelse (position2mag=="position01_mag9", 1, 0))
baseFull$position01mag10 <- with (baseFull, ifelse (position2mag=="position01_mag10", 1, 0))
baseFull$position01mag12 <- with (baseFull, ifelse (position2mag=="position01_mag12", 1, 0))
baseFull$position01mag13 <- with (baseFull, ifelse (position2mag=="position01_mag13", 1, 0))
baseFull$position01mag35 <- with (baseFull, ifelse (position2mag=="position01_mag35", 1, 0))
baseFull$position02mag2 <- with (baseFull, ifelse (position2mag=="position02_mag2", 1, 0))
baseFull$position02mag3 <- with (baseFull, ifelse (position2mag=="position02_mag3", 1, 0))
baseFull$position02mag4 <- with (baseFull, ifelse (position2mag=="position02_mag4", 1, 0))
baseFull$position02mag5 <- with (baseFull, ifelse (position2mag=="position02_mag5", 1, 0))
baseFull$position02mag9 <- with (baseFull, ifelse (position2mag=="position02_mag9", 1, 0))
baseFull$position02mag10 <- with (baseFull, ifelse (position2mag=="position02_mag10", 1, 0))
baseFull$position02mag12 <- with (baseFull, ifelse (position2mag=="position02_mag12", 1, 0))
baseFull$position02mag13 <- with (baseFull, ifelse (position2mag=="position02_mag13", 1, 0))
baseFull$position02mag35 <- with (baseFull, ifelse (position2mag=="position02_mag35", 1, 0))
baseFull$position03mag3 <- with (baseFull, ifelse (position2mag=="position03_mag3", 1, 0))
baseFull$position03mag4 <- with (baseFull, ifelse (position2mag=="position03_mag4", 1, 0))
baseFull$position03mag5 <- with (baseFull, ifelse (position2mag=="position03_mag5", 1, 0))
baseFull$position03mag9 <- with (baseFull, ifelse (position2mag=="position03_mag9", 1, 0))
baseFull$position03mag10 <- with (baseFull, ifelse (position2mag=="position03_mag10", 1, 0))
baseFull$position03mag12 <- with (baseFull, ifelse (position2mag=="position03_mag12", 1, 0))
baseFull$position03mag13 <- with (baseFull, ifelse (position2mag=="position03_mag13", 1, 0))
baseFull$position03mag35 <- with (baseFull, ifelse (position2mag=="position03_mag35", 1, 0))
baseFull$position04mag4 <- with (baseFull, ifelse (position2mag=="position04_mag4", 1, 0))
baseFull$position04mag5 <- with (baseFull, ifelse (position2mag=="position04_mag5", 1, 0))
baseFull$position04mag9 <- with (baseFull, ifelse (position2mag=="position04_mag9", 1, 0))
baseFull$position04mag10 <- with (baseFull, ifelse (position2mag=="position04_mag10", 1, 0))
baseFull$position04mag12 <- with (baseFull, ifelse (position2mag=="position04_mag12", 1, 0))
baseFull$position04mag13 <- with (baseFull, ifelse (position2mag=="position04_mag13", 1, 0))
baseFull$position04mag35 <- with (baseFull, ifelse (position2mag=="position04_mag35", 1, 0))
baseFull$position05mag5 <- with (baseFull, ifelse (position2mag=="position05+_mag5", 1, 0))
baseFull$position05mag9 <- with (baseFull, ifelse (position2mag=="position05+_mag9", 1, 0))
baseFull$position05mag10 <- with (baseFull, ifelse (position2mag=="position05+_mag10", 1, 0))
baseFull$position05mag12 <- with (baseFull, ifelse (position2mag=="position05+_mag12", 1, 0))
baseFull$position05mag13 <- with (baseFull, ifelse (position2mag=="position05+_mag13", 1, 0))
baseFull$position05mag35 <- with (baseFull, ifelse (position2mag=="position05+_mag35", 1, 0))

# we will segment the analysis by subsamples: (a) elections where the governor's party was the next in line to receive or lose a seat; (b) same for PJ; and (c) same for the UCR
baseFull$sampGOVin <- with (baseFull, addRank01 * nextIn * incGober)
baseFull$sampPJin <- with (baseFull, addRank01 * nextIn * partyPJ)
baseFull$sampUCRin <- with (baseFull, addRank01 * nextIn * partyUCR)

baseFull$sampGOVout <- with (baseFull, subRank01 * nextOut * incGober)
baseFull$sampPJout <- with (baseFull, subRank01 * nextOut * partyPJ)
baseFull$sampUCRout <- with (baseFull, subRank01 * nextOut * partyUCR)

baseFull$sampGOVin_RT <- with (baseFull, addRank_RT01 * nextIn * incGober)
baseFull$sampPJin_RT <- with (baseFull, addRank_RT01 * nextIn * partyPJ)
baseFull$sampUCRin_RT <- with (baseFull, addRank_RT01 * nextIn * partyUCR)

baseFull$sampGOVout_RT <- with (baseFull, subRank_RT01 * nextOut * incGober)
baseFull$sampPJout_RT <- with (baseFull, subRank_RT01 * nextOut * partyPJ)
baseFull$sampUCRout_RT <- with (baseFull, subRank_RT01 * nextOut * partyUCR)

# aggregating the information at the election level
samples <- as.data.frame (with (baseFull, factor (names (by (sampGOVin, election, max)))))
colnames (samples) <- "election"
samples$sampGOVin <- with (baseFull, by (sampGOVin, election, max))[]
samples$sampGOVout <- with (baseFull, by (sampGOVout, election, max))[]
samples$sampGOV <- with (samples, factor (ifelse (is.na (sampGOVin), NA, paste ("samp", sampGOVin, sampGOVout, sep=""))))
samples$sampPJin <- with (baseFull, by (sampPJin, election, max))[]
samples$sampPJout <- with (baseFull, by (sampPJout, election, max))[]
samples$sampPJ <- with (samples, factor (ifelse (is.na (sampPJin), NA, paste ("samp", sampPJin, sampPJout, sep=""))))
samples$sampUCRin <- with (baseFull, by (sampUCRin, election, max))[]
samples$sampUCRout <- with (baseFull, by (sampUCRout, election, max))[]
samples$sampUCR <- with (samples, factor (ifelse (is.na (sampUCRin), NA, paste ("samp", sampUCRin, sampUCRout, sep=""))))
samples$sampGOVin_RT <- with (baseFull, by (sampGOVin_RT, election, max))[]
samples$sampGOVout_RT <- with (baseFull, by (sampGOVout_RT, election, max))[]
samples$sampGOV_RT <- with (samples, factor (ifelse (is.na (sampGOVin_RT), NA, paste ("samp", sampGOVin_RT, sampGOVout_RT, sep=""))))
samples$sampPJin_RT <- with (baseFull, by (sampPJin_RT, election, max))[]
samples$sampPJout_RT <- with (baseFull, by (sampPJout_RT, election, max))[]
samples$sampPJ_RT <- with (samples, factor (ifelse (is.na (sampPJin_RT), NA, paste ("samp", sampPJin_RT, sampPJout_RT, sep=""))))
samples$sampUCRin_RT <- with (baseFull, by (sampUCRin_RT, election, max))[]
samples$sampUCRout_RT <- with (baseFull, by (sampUCRout_RT, election, max))[]
samples$sampUCR_RT <- with (samples, factor (ifelse (is.na (sampUCRin_RT), NA, paste ("samp", sampUCRin_RT, sampUCRout_RT, sep=""))))
samples$sampGOVb <- with (samples, ifelse (sampGOV=="samp01" | sampGOV=="samp10", 1, 0))
samples$sampPJb <- with (samples, ifelse (sampPJ=="samp01" | sampPJ=="samp10", 1, 0))
samples$sampUCRb <- with (samples, ifelse (sampUCR=="samp01" | sampUCR=="samp10", 1, 0))
samples$sampANY <- with (samples, ifelse (is.na (sampGOVb) & sampPJb+sampUCRb>0, 1, ifelse (sampGOVb+sampPJb+sampUCRb>0, 1, 0)))
samples$sampGOVb_RT <- with (samples, ifelse (sampGOV_RT=="samp01" | sampGOV_RT=="samp10", 1, 0))
samples$sampPJb_RT <- with (samples, ifelse (sampPJ_RT=="samp01" | sampPJ_RT=="samp10", 1, 0))
samples$sampUCRb_RT <- with (samples, ifelse (sampUCR_RT=="samp01" | sampUCR_RT=="samp10", 1, 0))
samples$sampANY_RT <- with (samples, ifelse (is.na (sampGOVb_RT) & sampPJb_RT+sampUCRb_RT>0, 1, ifelse (sampGOVb_RT+sampPJb_RT+sampUCRb_RT>0, 1, 0)))

# merging
baseFull <- merge (baseFull, samples[,c ("election", "sampGOV", "sampPJ", "sampUCR", "sampGOVb", "sampPJb", "sampUCRb","sampANY", "sampGOV_RT", "sampPJ_RT", "sampUCR_RT", "sampGOVb_RT", "sampPJb_RT", "sampUCRb_RT","sampANY_RT")], by.x="election", by.y="election")


## Creating separate datasets for every party subsample of interest
base.g <- baseFull[baseFull$year <= 2011 & (baseFull$sampGOVin==1 | baseFull$sampGOVout==1) & !is.na (baseFull$sampGOVb) & baseFull$sampGOVb==1,]
base.p <- baseFull[baseFull$year <= 2011 & (baseFull$sampPJin==1 | baseFull$sampPJout==1) & baseFull$sampPJb==1,]
base.r <- baseFull[baseFull$year <= 2011 & (baseFull$sampUCRin==1 | baseFull$sampUCRout==1) & baseFull$sampUCRb==1,]

base.g_RT <- baseFull[baseFull$year <= 2011 & (baseFull$sampGOVin_RT==1 | baseFull$sampGOVout_RT==1) & !is.na (baseFull$sampGOVb_RT) & baseFull$sampGOVb_RT==1,]
base.p_RT <- baseFull[baseFull$year <= 2011 & (baseFull$sampPJin_RT==1 | baseFull$sampPJout_RT==1) & baseFull$sampPJb_RT==1,]
base.r_RT <- baseFull[baseFull$year <= 2011 & (baseFull$sampUCRin_RT==1 | baseFull$sampUCRout_RT==1) & baseFull$sampUCRb_RT==1,]

# re-factorizing
base.g$election <- factor (base.g$election)
base.g$district <- factor (base.g$district)
base.g$period <- factor (base.g$period)
base.g$name <- factor (base.g$name)
base.g$magStatus <- factor (base.g$magStatus)
base.g$list <- factor (base.g$list)
base.g$position2 <- ordered (base.g$position2)
base.g$position2sh <- factor (base.g$position2sh)
base.g$position2mag <- factor (base.g$position2mag)
base.g$sampGOV <- factor (base.g$sampGOV)
base.g$diffProv <- NULL
base.g$sampGOVb <- NULL
base.g$sampPJb <- NULL
base.g$sampUCRb <- NULL
base.g$sampANY <- NULL

base.p$election <- factor (base.p$election)
base.p$district <- factor (base.p$district)
base.p$period <- factor (base.p$period)
base.p$name <- factor (base.p$name)
base.p$magStatus <- factor (base.p$magStatus)
base.p$list <- factor (base.p$list)
base.p$position2 <- ordered (base.p$position2)
base.p$position2sh <- factor (base.p$position2sh)
base.p$position2mag <- factor (base.p$position2mag)
base.p$sampPJ <- factor (base.p$sampPJ)
base.p$diffProv <- NULL
base.p$sampGOVb <- NULL
base.p$sampPJb <- NULL
base.p$sampUCRb <- NULL
base.p$sampANY <- NULL

base.r$election <- factor (base.r$election)
base.r$district <- factor (base.r$district)
base.r$period <- factor (base.r$period)
base.r$name <- factor (base.r$name)
base.r$magStatus <- factor (base.r$magStatus)
base.r$list <- factor (base.r$list)
base.r$position2 <- ordered (base.r$position2)
base.r$position2sh <- factor (base.r$position2sh)
base.r$position2mag <- factor (base.r$position2mag)
base.r$sampUCR <- factor (base.r$sampUCR)
base.r$diffProv <- NULL
base.r$sampGOVb <- NULL
base.r$sampPJb <- NULL
base.r$sampUCRb <- NULL
base.r$sampANY <- NULL

base.g_RT$election <- factor (base.g_RT$election)
base.g_RT$district <- factor (base.g_RT$district)
base.g_RT$period <- factor (base.g_RT$period)
base.g_RT$name <- factor (base.g_RT$name)
base.g_RT$magStatus <- factor (base.g_RT$magStatus)
base.g_RT$list <- factor (base.g_RT$list)
base.g_RT$position2 <- ordered (base.g_RT$position2)
base.g_RT$position2sh <- factor (base.g_RT$position2sh)
base.g_RT$position2mag <- factor (base.g_RT$position2mag)
base.g_RT$sampGOV_RT <- factor (base.g_RT$sampGOV_RT)
base.g_RT$diffProv <- NULL
base.g_RT$sampGOVb_RT <- NULL
base.g_RT$sampPJb_RT <- NULL
base.g_RT$sampUCRb_RT <- NULL
base.g_RT$sampANY_RT <- NULL

base.p_RT$election <- factor (base.p_RT$election)
base.p_RT$district <- factor (base.p_RT$district)
base.p_RT$period <- factor (base.p_RT$period)
base.p_RT$name <- factor (base.p_RT$name)
base.p_RT$magStatus <- factor (base.p_RT$magStatus)
base.p_RT$list <- factor (base.p_RT$list)
base.p_RT$position2 <- ordered (base.p_RT$position2)
base.p_RT$position2sh <- factor (base.p_RT$position2sh)
base.p_RT$position2mag <- factor (base.p_RT$position2mag)
base.p_RT$sampPJ_RT <- factor (base.p_RT$sampPJ_RT)
base.p_RT$diffProv <- NULL
base.p_RT$sampGOVb_RT <- NULL
base.p_RT$sampPJb_RT <- NULL
base.p_RT$sampUCRb_RT <- NULL
base.p_RT$sampANY_RT <- NULL

base.r_RT$election <- factor (base.r_RT$election)
base.r_RT$district <- factor (base.r_RT$district)
base.r_RT$period <- factor (base.r_RT$period)
base.r_RT$name <- factor (base.r_RT$name)
base.r_RT$magStatus <- factor (base.r_RT$magStatus)
base.r_RT$list <- factor (base.r_RT$list)
base.r_RT$position2 <- ordered (base.r_RT$position2)
base.r_RT$position2sh <- factor (base.r_RT$position2sh)
base.r_RT$position2mag <- factor (base.r_RT$position2mag)
base.r_RT$sampUCR_RT <- factor (base.r_RT$sampUCR_RT)
base.r_RT$diffProv <- NULL
base.r_RT$sampGOVb_RT <- NULL
base.r_RT$sampPJb_RT <- NULL
base.r_RT$sampUCRb_RT <- NULL
base.r_RT$sampANY_RT <- NULL





#%%%%%%%%%%%%%%%%%%%%%%%%%%#
#### Running the models ####
#%%%%%%%%%%%%%%%%%%%%%%%%%%#

### Models reported in Tables 2 and A8-A17

## Outcome: Renomination at either t+2 or t+4

## governor's party

# all provinces
summary ((m02gov_01a1 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01a2 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01a3 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01a4 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01a5 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01a6 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01a7 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01a8 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01a9 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_01b1 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01b2 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01b3 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01b4 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01b5 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01b6 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01b7 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01b8 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01b9 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_01c1 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01c2 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01c3 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01c4 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01c5 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01c6 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01c7 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01c8 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01c9 <- with (base.g, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02gov_01d1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01d2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01d3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01d5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01d6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01d7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01d8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01d9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_01e1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01e2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01e3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01e4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01e5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01e6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01e7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01e8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01e9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_01f1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01f2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01f3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01f4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01f5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01f6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01f7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01f8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01f9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, all provinces
summary ((m02gov_01g1 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01g2 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01g3 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01g4 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01g5 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01g6 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01g7 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01g8 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01g9 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02gov_01j1 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01j2 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01j3 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01j4 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01j5 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01j6 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01j7 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01j8 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01j9 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02gov_01m1 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01m2 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01m3 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01m4 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01m5 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01m6 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01m7 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01m8 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01m9 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02gov_01p1 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01p2 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01p3 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01p4 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01p5 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01p6 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01p7 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01p8 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01p9 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02gov_01s1 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01s2 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01s3 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01s4 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01s5 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01s6 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01s7 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01s8 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01s9 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02gov_01v1 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01v2 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01v3 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01v4 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01v5 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01v6 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01v7 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01v8 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01v9 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02gov_01aa1 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01aa2 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01aa3 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01aa4 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01aa5 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01aa6 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01aa7 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01aa8 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01aa9 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02gov_01ad1 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01ad2 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01ad3 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01ad4 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01ad5 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01ad6 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01ad7 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01ad8 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01ad9 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02gov_01ag1 <- with (base.g[base.g$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01ag2 <- with (base.g[base.g$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01ag3 <- with (base.g[base.g$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01ag4 <- with (base.g[base.g$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01ag5 <- with (base.g[base.g$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01ag6 <- with (base.g[base.g$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01ag7 <- with (base.g[base.g$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01ag8 <- with (base.g[base.g$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01ag9 <- with (base.g[base.g$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02gov_01aj1 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01aj2 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01aj3 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01aj4 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01aj5 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01aj6 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01aj7 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01aj8 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01aj9 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02gov_01am1 <- with (base.g[base.g$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01am2 <- with (base.g[base.g$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01am3 <- with (base.g[base.g$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01am4 <- with (base.g[base.g$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01am5 <- with (base.g[base.g$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01am6 <- with (base.g[base.g$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01am7 <- with (base.g[base.g$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01am8 <- with (base.g[base.g$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01am9 <- with (base.g[base.g$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02gov_01ap1 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01ap2 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01ap3 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_01ap4 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01ap5 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01ap6 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_01ap7 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01ap8 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_01ap9 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))


## PJ

# all provinces
summary ((m02pj_01a1 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01a2 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01a3 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01a4 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01a5 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01a6 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01a7 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01a8 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01a9 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_01b1 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01b2 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01b3 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01b4 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01b5 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01b6 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01b7 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01b8 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01b9 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_01c1 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01c2 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01c3 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01c4 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01c5 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01c6 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01c7 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01c8 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01c9 <- with (base.p, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02pj_01d1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01d2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01d3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01d5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01d6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01d7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01d8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01d9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_01e1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01e2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01e3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01e4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01e5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01e6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01e7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01e8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01e9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_01f1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01f2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01f3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01f4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01f5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01f6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01f7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01f8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01f9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, all provinces
summary ((m02pj_01g1 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01g2 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01g3 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01g4 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01g5 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01g6 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01g7 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01g8 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01g9 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02pj_01j1 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01j2 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01j3 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01j4 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01j5 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01j6 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01j7 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01j8 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01j9 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02pj_01m1 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01m2 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01m3 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01m4 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01m5 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01m6 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01m7 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01m8 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01m9 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02pj_01p1 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01p2 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01p3 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01p4 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01p5 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01p6 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01p7 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01p8 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01p9 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02pj_01s1 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01s2 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01s3 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01s4 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01s5 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01s6 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01s7 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01s8 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01s9 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02pj_01v1 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01v2 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01v3 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01v4 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01v5 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01v6 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01v7 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01v8 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01v9 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02pj_01aa1 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01aa2 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01aa3 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01aa4 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01aa5 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01aa6 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01aa7 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01aa8 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01aa9 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02pj_01ad1 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01ad2 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01ad3 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01ad4 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01ad5 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01ad6 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01ad7 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01ad8 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01ad9 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02pj_01ag1 <- with (base.p[base.p$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01ag2 <- with (base.p[base.p$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01ag3 <- with (base.p[base.p$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01ag4 <- with (base.p[base.p$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01ag5 <- with (base.p[base.p$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01ag6 <- with (base.p[base.p$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01ag7 <- with (base.p[base.p$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01ag8 <- with (base.p[base.p$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01ag9 <- with (base.p[base.p$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02pj_01aj1 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01aj2 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01aj3 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01aj4 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01aj5 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01aj6 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01aj7 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01aj8 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01aj9 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02pj_01am1 <- with (base.p[base.p$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01am2 <- with (base.p[base.p$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01am3 <- with (base.p[base.p$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01am4 <- with (base.p[base.p$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01am5 <- with (base.p[base.p$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01am6 <- with (base.p[base.p$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01am7 <- with (base.p[base.p$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01am8 <- with (base.p[base.p$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01am9 <- with (base.p[base.p$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02pj_01ap1 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01ap2 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01ap3 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_01ap4 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01ap5 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01ap6 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_01ap7 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01ap8 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_01ap9 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))


## UCR

# all provinces
summary ((m02ucr_01a1 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01a2 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01a3 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01a4 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01a5 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01a6 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01a7 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01a8 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01a9 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_01b1 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01b2 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01b3 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01b4 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01b5 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01b6 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01b7 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01b8 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01b9 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_01c1 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01c2 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01c3 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01c4 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01c5 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01c6 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01c7 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01c8 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01c9 <- with (base.r, rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02ucr_01d1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01d2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01d3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01d5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01d6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01d7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01d8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01d9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_01e1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01e2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01e3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01e4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01e5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01e6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01e7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01e8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01e9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_01f1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01f2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01f3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01f4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01f5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01f6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01f7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01f8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01f9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, all provinces
summary ((m02ucr_01g1 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01g2 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01g3 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01g4 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01g5 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01g6 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01g7 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01g8 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01g9 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02ucr_01j1 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01j2 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01j3 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01j4 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01j5 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01j6 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01j7 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01j8 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01j9 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02ucr_01m1 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01m2 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01m3 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01m4 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01m5 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01m6 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01m7 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01m8 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01m9 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02ucr_01p1 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01p2 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01p3 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01p4 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01p5 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01p6 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01p7 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01p8 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01p9 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02ucr_01s1 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01s2 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01s3 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01s4 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01s5 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01s6 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01s7 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01s8 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01s9 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02ucr_01v1 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01v2 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01v3 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01v4 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01v5 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01v6 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01v7 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01v8 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01v9 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02ucr_01aa1 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01aa2 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01aa3 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01aa4 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01aa5 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01aa6 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01aa7 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01aa8 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01aa9 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02ucr_01ad1 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01ad2 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01ad3 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01ad4 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01ad5 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01ad6 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01ad7 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01ad8 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01ad9 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02ucr_01ag1 <- with (base.r[base.r$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01ag2 <- with (base.r[base.r$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01ag3 <- with (base.r[base.r$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01ag4 <- with (base.r[base.r$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01ag5 <- with (base.r[base.r$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01ag6 <- with (base.r[base.r$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01ag7 <- with (base.r[base.r$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01ag8 <- with (base.r[base.r$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01ag9 <- with (base.r[base.r$female==1,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02ucr_01aj1 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01aj2 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01aj3 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01aj4 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01aj5 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01aj6 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01aj7 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01aj8 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01aj9 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02ucr_01am1 <- with (base.r[base.r$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01am2 <- with (base.r[base.r$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01am3 <- with (base.r[base.r$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01am4 <- with (base.r[base.r$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01am5 <- with (base.r[base.r$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01am6 <- with (base.r[base.r$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01am7 <- with (base.r[base.r$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01am8 <- with (base.r[base.r$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01am9 <- with (base.r[base.r$female==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02ucr_01ap1 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01ap2 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01ap3 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_01ap4 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01ap5 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01ap6 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_01ap7 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01ap8 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_01ap9 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))


## Served as legislator at any moment afterwards (1) or not (0)

## governor's party

# all provinces
summary ((m02gov_02a1 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02a2 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02a3 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02a4 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02a5 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02a6 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02a7 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02a8 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02a9 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_02b1 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02b2 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02b3 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02b4 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02b5 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02b6 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02b7 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02b8 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02b9 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_02c1 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02c2 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02c3 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02c4 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02c5 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02c6 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02c7 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02c8 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02c9 <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02gov_02d1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02d2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02d3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02d5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02d6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02d7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02d8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02d9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_02e1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02e2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02e3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02e4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02e5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02e6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02e7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02e8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02e9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_02f1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02f2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02f3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02f4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02f5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02f6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02f7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02f8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02f9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, all provinces
summary ((m02gov_02g1 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02g2 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02g3 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02g4 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02g5 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02g6 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02g7 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02g8 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02g9 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02gov_02j1 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02j2 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02j3 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02j4 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02j5 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02j6 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02j7 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02j8 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02j9 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02gov_02m1 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02m2 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02m3 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02m4 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02m5 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02m6 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02m7 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02m8 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02m9 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02gov_02p1 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02p2 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02p3 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02p4 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02p5 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02p6 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02p7 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02p8 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02p9 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02gov_02s1 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02s2 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02s3 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02s4 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02s5 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02s6 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02s7 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02s8 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02s9 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02gov_02v1 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02v2 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02v3 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02v4 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02v5 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02v6 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02v7 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02v8 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02v9 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02gov_02aa1 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02aa2 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02aa3 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02aa4 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02aa5 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02aa6 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02aa7 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02aa8 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02aa9 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02gov_02ad1 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02ad2 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02ad3 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02ad4 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02ad5 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02ad6 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02ad7 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02ad8 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02ad9 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02gov_02ag1 <- with (base.g[base.g$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02ag2 <- with (base.g[base.g$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02ag3 <- with (base.g[base.g$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02ag4 <- with (base.g[base.g$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02ag5 <- with (base.g[base.g$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02ag6 <- with (base.g[base.g$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02ag7 <- with (base.g[base.g$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02ag8 <- with (base.g[base.g$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02ag9 <- with (base.g[base.g$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02gov_02aj1 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02aj2 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02aj3 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02aj4 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02aj5 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02aj6 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02aj7 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02aj8 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02aj9 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02gov_02am1 <- with (base.g[base.g$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02am2 <- with (base.g[base.g$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02am3 <- with (base.g[base.g$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02am4 <- with (base.g[base.g$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02am5 <- with (base.g[base.g$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02am6 <- with (base.g[base.g$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02am7 <- with (base.g[base.g$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02am8 <- with (base.g[base.g$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02am9 <- with (base.g[base.g$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02gov_02ap1 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02ap2 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02ap3 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_02ap4 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02ap5 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02ap6 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_02ap7 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02ap8 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_02ap9 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))


## PJ

# all provinces
summary ((m02pj_02a1 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02a2 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02a3 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02a4 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02a5 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02a6 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02a7 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02a8 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02a9 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_02b1 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02b2 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02b3 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02b4 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02b5 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02b6 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02b7 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02b8 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02b9 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_02c1 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02c2 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02c3 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02c4 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02c5 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02c6 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02c7 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02c8 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02c9 <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02pj_02d1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02d2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02d3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02d5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02d6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02d7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02d8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02d9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_02e1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02e2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02e3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02e4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02e5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02e6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02e7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02e8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02e9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_02f1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02f2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02f3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02f4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02f5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02f6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02f7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02f8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02f9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, all provinces
summary ((m02pj_02g1 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02g2 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02g3 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02g4 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02g5 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02g6 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02g7 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02g8 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02g9 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02pj_02j1 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02j2 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02j3 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02j4 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02j5 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02j6 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02j7 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02j8 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02j9 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02pj_02m1 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02m2 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02m3 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02m4 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02m5 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02m6 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02m7 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02m8 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02m9 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02pj_02p1 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02p2 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02p3 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02p4 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02p5 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02p6 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02p7 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02p8 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02p9 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02pj_02s1 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02s2 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02s3 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02s4 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02s5 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02s6 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02s7 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02s8 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02s9 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02pj_02v1 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02v2 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02v3 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02v4 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02v5 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02v6 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02v7 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02v8 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02v9 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02pj_02aa1 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02aa2 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02aa3 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02aa4 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02aa5 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02aa6 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02aa7 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02aa8 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02aa9 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02pj_02ad1 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02ad2 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02ad3 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02ad4 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02ad5 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02ad6 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02ad7 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02ad8 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02ad9 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02pj_02ag1 <- with (base.p[base.p$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02ag2 <- with (base.p[base.p$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02ag3 <- with (base.p[base.p$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02ag4 <- with (base.p[base.p$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02ag5 <- with (base.p[base.p$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02ag6 <- with (base.p[base.p$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02ag7 <- with (base.p[base.p$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02ag8 <- with (base.p[base.p$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02ag9 <- with (base.p[base.p$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02pj_02aj1 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02aj2 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02aj3 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02aj4 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02aj5 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02aj6 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02aj7 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02aj8 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02aj9 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02pj_02am1 <- with (base.p[base.p$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02am2 <- with (base.p[base.p$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02am3 <- with (base.p[base.p$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02am4 <- with (base.p[base.p$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02am5 <- with (base.p[base.p$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02am6 <- with (base.p[base.p$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02am7 <- with (base.p[base.p$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02am8 <- with (base.p[base.p$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02am9 <- with (base.p[base.p$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02pj_02ap1 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02ap2 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02ap3 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_02ap4 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02ap5 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02ap6 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_02ap7 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02ap8 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_02ap9 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))


## UCR

# all provinces
summary ((m02ucr_02a1 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02a2 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02a3 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02a4 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02a5 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02a6 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02a7 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02a8 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02a9 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_02b1 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02b2 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02b3 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02b4 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02b5 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02b6 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02b7 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02b8 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02b9 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_02c1 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02c2 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02c3 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02c4 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02c5 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02c6 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02c7 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02c8 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02c9 <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02ucr_02d1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02d2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02d3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02d5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02d6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02d7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02d8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02d9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_02e1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02e2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02e3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02e4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02e5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02e6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02e7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02e8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02e9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_02f1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02f2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02f3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02f4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02f5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02f6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02f7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02f8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02f9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, all provinces
summary ((m02ucr_02g1 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02g2 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02g3 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02g4 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02g5 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02g6 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02g7 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02g8 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02g9 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02ucr_02j1 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02j2 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02j3 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02j4 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02j5 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02j6 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02j7 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02j8 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02j9 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02ucr_02m1 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02m2 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02m3 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02m4 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02m5 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02m6 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02m7 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02m8 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02m9 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02ucr_02p1 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02p2 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02p3 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02p4 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02p5 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02p6 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02p7 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02p8 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02p9 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02ucr_02s1 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02s2 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02s3 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02s4 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02s5 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02s6 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02s7 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02s8 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02s9 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02ucr_02v1 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02v2 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02v3 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02v4 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02v5 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02v6 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02v7 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02v8 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02v9 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02ucr_02aa1 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02aa2 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02aa3 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02aa4 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02aa5 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02aa6 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02aa7 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02aa8 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02aa9 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02ucr_02ad1 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02ad2 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02ad3 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02ad4 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02ad5 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02ad6 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02ad7 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02ad8 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02ad9 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02ucr_02ag1 <- with (base.r[base.r$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02ag2 <- with (base.r[base.r$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02ag3 <- with (base.r[base.r$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02ag4 <- with (base.r[base.r$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02ag5 <- with (base.r[base.r$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02ag6 <- with (base.r[base.r$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02ag7 <- with (base.r[base.r$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02ag8 <- with (base.r[base.r$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02ag9 <- with (base.r[base.r$female==1,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02ucr_02aj1 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02aj2 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02aj3 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02aj4 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02aj5 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02aj6 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02aj7 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02aj8 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02aj9 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02ucr_02am1 <- with (base.r[base.r$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02am2 <- with (base.r[base.r$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02am3 <- with (base.r[base.r$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02am4 <- with (base.r[base.r$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02am5 <- with (base.r[base.r$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02am6 <- with (base.r[base.r$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02am7 <- with (base.r[base.r$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02am8 <- with (base.r[base.r$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02am9 <- with (base.r[base.r$female==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02ucr_02ap1 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02ap2 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02ap3 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_02ap4 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02ap5 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02ap6 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_02ap7 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02ap8 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_02ap9 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))


### Served as executive at any moment afterwards (1) or not (0)

## governor's party

# all provinces
summary ((m02gov_03a1 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03a2 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03a3 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03a4 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03a5 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03a6 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03a7 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03a8 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03a9 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_03b1 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03b2 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03b3 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03b4 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03b5 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03b6 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03b7 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03b8 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03b9 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_03c1 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03c2 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03c3 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03c4 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03c5 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03c6 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03c7 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03c8 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03c9 <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02gov_03d1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03d2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03d3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03d5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03d6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03d7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03d8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03d9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_03e1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03e2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03e3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03e4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03e5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03e6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03e7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03e8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03e9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_03f1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03f2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03f3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03f4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03f5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03f6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03f7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03f8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03f9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# (2.3.1.3) no previous experience, all provinces
summary ((m02gov_03g1 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03g2 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03g3 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03g4 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03g5 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03g6 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03g7 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03g8 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03g9 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02gov_03j1 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03j2 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03j3 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03j4 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03j5 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03j6 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03j7 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03j8 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03j9 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02gov_03m1 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03m2 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03m3 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03m4 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03m5 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03m6 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03m7 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03m8 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03m9 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02gov_03p1 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03p2 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03p3 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03p4 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03p5 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03p6 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03p7 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03p8 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03p9 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02gov_03s1 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03s2 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03s3 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03s4 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03s5 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03s6 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03s7 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03s8 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03s9 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02gov_03v1 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03v2 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03v3 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03v4 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03v5 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03v6 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03v7 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03v8 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03v9 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02gov_03aa1 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03aa2 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03aa3 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03aa4 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03aa5 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03aa6 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03aa7 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03aa8 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03aa9 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02gov_03ad1 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03ad2 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03ad3 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03ad4 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03ad5 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03ad6 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03ad7 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03ad8 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03ad9 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02gov_03ag1 <- with (base.g[base.g$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03ag2 <- with (base.g[base.g$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03ag3 <- with (base.g[base.g$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03ag4 <- with (base.g[base.g$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03ag5 <- with (base.g[base.g$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03ag6 <- with (base.g[base.g$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03ag7 <- with (base.g[base.g$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03ag8 <- with (base.g[base.g$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03ag9 <- with (base.g[base.g$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02gov_03aj1 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03aj2 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03aj3 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03aj4 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03aj5 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03aj6 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03aj7 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03aj8 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03aj9 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02gov_03am1 <- with (base.g[base.g$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03am2 <- with (base.g[base.g$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03am3 <- with (base.g[base.g$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03am4 <- with (base.g[base.g$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03am5 <- with (base.g[base.g$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03am6 <- with (base.g[base.g$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03am7 <- with (base.g[base.g$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03am8 <- with (base.g[base.g$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03am9 <- with (base.g[base.g$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02gov_03ap1 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03ap2 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03ap3 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_03ap4 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03ap5 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03ap6 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_03ap7 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03ap8 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_03ap9 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))


## PJ

# all provinces
summary ((m02pj_03a1 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03a2 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03a3 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03a4 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03a5 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03a6 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03a7 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03a8 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03a9 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_03b1 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03b2 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03b3 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03b4 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03b5 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03b6 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03b7 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03b8 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03b9 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_03c1 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03c2 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03c3 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03c4 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03c5 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03c6 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03c7 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03c8 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03c9 <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02pj_03d1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03d2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03d3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03d5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03d6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03d7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03d8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03d9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_03e1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03e2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03e3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03e4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03e5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03e6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03e7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03e8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03e9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_03f1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03f2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03f3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03f4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03f5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03f6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03f7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03f8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03f9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, all provinces
summary ((m02pj_03g1 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03g2 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03g3 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03g4 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03g5 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03g6 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03g7 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03g8 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03g9 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02pj_03j1 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03j2 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03j3 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03j4 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03j5 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03j6 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03j7 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03j8 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03j9 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02pj_03m1 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03m2 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03m3 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03m4 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03m5 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03m6 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03m7 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03m8 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03m9 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02pj_03p1 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03p2 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03p3 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03p4 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03p5 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03p6 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03p7 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03p8 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03p9 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02pj_03s1 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03s2 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03s3 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03s4 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03s5 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03s6 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03s7 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03s8 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03s9 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02pj_03v1 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03v2 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03v3 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03v4 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03v5 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03v6 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03v7 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03v8 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03v9 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02pj_03aa1 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03aa2 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03aa3 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03aa4 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03aa5 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03aa6 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03aa7 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03aa8 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03aa9 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02pj_03ad1 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03ad2 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03ad3 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03ad4 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03ad5 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03ad6 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03ad7 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03ad8 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03ad9 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02pj_03ag1 <- with (base.p[base.p$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03ag2 <- with (base.p[base.p$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03ag3 <- with (base.p[base.p$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03ag4 <- with (base.p[base.p$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03ag5 <- with (base.p[base.p$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03ag6 <- with (base.p[base.p$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03ag7 <- with (base.p[base.p$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03ag8 <- with (base.p[base.p$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03ag9 <- with (base.p[base.p$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02pj_03aj1 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03aj2 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03aj3 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03aj4 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03aj5 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03aj6 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03aj7 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03aj8 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03aj9 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02pj_03am1 <- with (base.p[base.p$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03am2 <- with (base.p[base.p$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03am3 <- with (base.p[base.p$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03am4 <- with (base.p[base.p$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03am5 <- with (base.p[base.p$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03am6 <- with (base.p[base.p$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03am7 <- with (base.p[base.p$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03am8 <- with (base.p[base.p$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03am9 <- with (base.p[base.p$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02pj_03ap1 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03ap2 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03ap3 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_03ap4 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03ap5 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03ap6 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_03ap7 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03ap8 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_03ap9 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))


## UCR

# all provinces
summary ((m02ucr_03a1 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03a2 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03a3 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03a4 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03a5 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03a6 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03a7 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03a8 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03a9 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_03b1 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03b2 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03b3 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03b4 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03b5 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03b6 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03b7 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03b8 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03b9 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_03c1 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03c2 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03c3 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03c4 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03c5 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03c6 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03c7 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03c8 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03c9 <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02ucr_03d1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03d2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03d3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03d5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03d6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03d7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03d8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03d9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_03e1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03e2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03e3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03e4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03e5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03e6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03e7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03e8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03e9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_03f1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03f2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03f3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03f4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03f5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03f6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03f7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03f8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03f9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, all provinces
summary ((m02ucr_03g1 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03g2 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03g3 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03g4 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03g5 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03g6 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03g7 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03g8 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03g9 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02ucr_03j1 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03j2 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03j3 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03j4 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03j5 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03j6 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03j7 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03j8 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03j9 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02ucr_03m1 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03m2 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03m3 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03m4 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03m5 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03m6 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03m7 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03m8 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03m9 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02ucr_03p1 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03p2 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03p3 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03p4 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03p5 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03p6 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03p7 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03p8 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03p9 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02ucr_03s1 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03s2 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03s3 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03s4 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03s5 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03s6 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03s7 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03s8 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03s9 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02ucr_03v1 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03v2 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03v3 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03v4 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03v5 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03v6 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03v7 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03v8 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03v9 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02ucr_03aa1 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03aa2 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03aa3 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03aa4 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03aa5 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03aa6 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03aa7 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03aa8 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03aa9 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02ucr_03ad1 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03ad2 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03ad3 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03ad4 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03ad5 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03ad6 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03ad7 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03ad8 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03ad9 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02ucr_03ag1 <- with (base.r[base.r$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03ag2 <- with (base.r[base.r$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03ag3 <- with (base.r[base.r$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03ag4 <- with (base.r[base.r$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03ag5 <- with (base.r[base.r$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03ag6 <- with (base.r[base.r$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03ag7 <- with (base.r[base.r$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03ag8 <- with (base.r[base.r$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03ag9 <- with (base.r[base.r$female==1,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02ucr_03aj1 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03aj2 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03aj3 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03aj4 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03aj5 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03aj6 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03aj7 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03aj8 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03aj9 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02ucr_03am1 <- with (base.r[base.r$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03am2 <- with (base.r[base.r$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03am3 <- with (base.r[base.r$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03am4 <- with (base.r[base.r$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03am5 <- with (base.r[base.r$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03am6 <- with (base.r[base.r$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03am7 <- with (base.r[base.r$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03am8 <- with (base.r[base.r$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03am9 <- with (base.r[base.r$female==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02ucr_03ap1 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03ap2 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03ap3 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_03ap4 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03ap5 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03ap6 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_03ap7 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03ap8 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_03ap9 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))


## Served as legislator OR executive at any moment afterwards (1) or not (0)

## governor's party

# all provinces
summary ((m02gov_05a1 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05a2 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05a3 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05a4 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05a5 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05a6 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05a7 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05a8 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05a9 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_05b1 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05b2 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05b3 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05b4 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05b5 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05b6 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05b7 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05b8 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05b9 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_05c1 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05c2 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05c3 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05c4 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05c5 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05c6 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05c7 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05c8 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05c9 <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02gov_05d1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05d2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05d3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05d5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05d6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05d7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05d8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05d9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_05e1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05e2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05e3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05e4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05e5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05e6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05e7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05e8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05e9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_05f1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05f2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05f3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05f4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05f5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05f6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05f7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05f8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05f9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, all provinces
summary ((m02gov_05g1 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05g2 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05g3 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05g4 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05g5 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05g6 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05g7 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05g8 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05g9 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02gov_05j1 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05j2 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05j3 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05j4 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05j5 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05j6 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05j7 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05j8 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05j9 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02gov_05m1 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05m2 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05m3 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05m4 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05m5 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05m6 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05m7 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05m8 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05m9 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02gov_05p1 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05p2 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05p3 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05p4 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05p5 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05p6 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05p7 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05p8 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05p9 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02gov_05s1 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05s2 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05s3 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05s4 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05s5 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05s6 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05s7 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05s8 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05s9 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02gov_05v1 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05v2 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05v3 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05v4 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05v5 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05v6 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05v7 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05v8 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05v9 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02gov_05aa1 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05aa2 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05aa3 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05aa4 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05aa5 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05aa6 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05aa7 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05aa8 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05aa9 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02gov_05ad1 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05ad2 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05ad3 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05ad4 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05ad5 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05ad6 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05ad7 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05ad8 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05ad9 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02gov_05ag1 <- with (base.g[base.g$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05ag2 <- with (base.g[base.g$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05ag3 <- with (base.g[base.g$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05ag4 <- with (base.g[base.g$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05ag5 <- with (base.g[base.g$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05ag6 <- with (base.g[base.g$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05ag7 <- with (base.g[base.g$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05ag8 <- with (base.g[base.g$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05ag9 <- with (base.g[base.g$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02gov_05aj1 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05aj2 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05aj3 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05aj4 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05aj5 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05aj6 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05aj7 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05aj8 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05aj9 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02gov_05am1 <- with (base.g[base.g$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05am2 <- with (base.g[base.g$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05am3 <- with (base.g[base.g$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05am4 <- with (base.g[base.g$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05am5 <- with (base.g[base.g$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05am6 <- with (base.g[base.g$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05am7 <- with (base.g[base.g$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05am8 <- with (base.g[base.g$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05am9 <- with (base.g[base.g$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02gov_05ap1 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05ap2 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05ap3 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_05ap4 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05ap5 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05ap6 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_05ap7 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05ap8 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_05ap9 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))


## PJ

# all provinces
summary ((m02pj_05a1 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05a2 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05a3 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05a4 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05a5 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05a6 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05a7 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05a8 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05a9 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_05b1 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05b2 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05b3 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05b4 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05b5 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05b6 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05b7 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05b8 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05b9 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_05c1 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05c2 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05c3 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05c4 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05c5 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05c6 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05c7 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05c8 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05c9 <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02pj_05d1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05d2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05d3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05d5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05d6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05d7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05d8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05d9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_05e1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05e2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05e3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05e4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05e5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05e6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05e7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05e8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05e9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_05f1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05f2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05f3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05f4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05f5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05f6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05f7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05f8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05f9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, all provinces
summary ((m02pj_05g1 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05g2 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05g3 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05g4 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05g5 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05g6 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05g7 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05g8 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05g9 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02pj_05j1 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05j2 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05j3 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05j4 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05j5 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05j6 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05j7 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05j8 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05j9 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02pj_05m1 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05m2 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05m3 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05m4 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05m5 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05m6 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05m7 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05m8 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05m9 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02pj_05p1 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05p2 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05p3 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05p4 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05p5 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05p6 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05p7 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05p8 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05p9 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02pj_05s1 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05s2 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05s3 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05s4 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05s5 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05s6 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05s7 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05s8 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05s9 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02pj_05v1 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05v2 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05v3 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05v4 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05v5 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05v6 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05v7 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05v8 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05v9 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02pj_05aa1 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05aa2 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05aa3 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05aa4 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05aa5 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05aa6 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05aa7 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05aa8 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05aa9 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02pj_05ad1 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05ad2 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05ad3 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05ad4 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05ad5 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05ad6 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05ad7 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05ad8 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05ad9 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02pj_05ag1 <- with (base.p[base.p$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05ag2 <- with (base.p[base.p$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05ag3 <- with (base.p[base.p$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05ag4 <- with (base.p[base.p$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05ag5 <- with (base.p[base.p$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05ag6 <- with (base.p[base.p$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05ag7 <- with (base.p[base.p$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05ag8 <- with (base.p[base.p$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05ag9 <- with (base.p[base.p$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02pj_05aj1 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05aj2 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05aj3 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05aj4 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05aj5 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05aj6 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05aj7 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05aj8 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05aj9 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02pj_05am1 <- with (base.p[base.p$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05am2 <- with (base.p[base.p$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05am3 <- with (base.p[base.p$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05am4 <- with (base.p[base.p$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05am5 <- with (base.p[base.p$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05am6 <- with (base.p[base.p$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05am7 <- with (base.p[base.p$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05am8 <- with (base.p[base.p$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05am9 <- with (base.p[base.p$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02pj_05ap1 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05ap2 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05ap3 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_05ap4 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05ap5 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05ap6 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_05ap7 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05ap8 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_05ap9 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))


## UCR

# all provinces
summary ((m02ucr_05a1 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05a2 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05a3 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05a4 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05a5 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05a6 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05a7 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05a8 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05a9 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_05b1 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05b2 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05b3 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05b4 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05b5 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05b6 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05b7 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05b8 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05b9 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_05c1 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05c2 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05c3 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05c4 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05c5 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05c6 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05c7 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05c8 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05c9 <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02ucr_05d1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05d2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05d3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05d5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05d6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05d7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05d8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05d9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_05e1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05e2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05e3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05e4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05e5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05e6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05e7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05e8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05e9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_05f1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05f2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05f3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05f4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05f5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05f6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05f7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05f8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05f9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, all provinces
summary ((m02ucr_05g1 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05g2 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05g3 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05g4 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05g5 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05g6 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05g7 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05g8 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05g9 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02ucr_05j1 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05j2 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05j3 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05j4 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05j5 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05j6 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05j7 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05j8 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05j9 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02ucr_05m1 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05m2 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05m3 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05m4 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05m5 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05m6 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05m7 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05m8 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05m9 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02ucr_05p1 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05p2 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05p3 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05p4 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05p5 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05p6 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05p7 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05p8 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05p9 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02ucr_05s1 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05s2 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05s3 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05s4 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05s5 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05s6 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05s7 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05s8 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05s9 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02ucr_05v1 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05v2 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05v3 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05v4 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05v5 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05v6 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05v7 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05v8 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05v9 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02ucr_05aa1 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05aa2 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05aa3 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05aa4 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05aa5 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05aa6 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05aa7 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05aa8 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05aa9 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02ucr_05ad1 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05ad2 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05ad3 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05ad4 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05ad5 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05ad6 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05ad7 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05ad8 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05ad9 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02ucr_05ag1 <- with (base.r[base.r$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05ag2 <- with (base.r[base.r$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05ag3 <- with (base.r[base.r$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05ag4 <- with (base.r[base.r$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05ag5 <- with (base.r[base.r$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05ag6 <- with (base.r[base.r$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05ag7 <- with (base.r[base.r$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05ag8 <- with (base.r[base.r$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05ag9 <- with (base.r[base.r$female==1,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02ucr_05aj1 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05aj2 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05aj3 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05aj4 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05aj5 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05aj6 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05aj7 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05aj8 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05aj9 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02ucr_05am1 <- with (base.r[base.r$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05am2 <- with (base.r[base.r$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05am3 <- with (base.r[base.r$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05am4 <- with (base.r[base.r$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05am5 <- with (base.r[base.r$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05am6 <- with (base.r[base.r$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05am7 <- with (base.r[base.r$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05am8 <- with (base.r[base.r$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05am9 <- with (base.r[base.r$female==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02ucr_05ap1 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05ap2 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05ap3 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_05ap4 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05ap5 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05ap6 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_05ap7 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05ap8 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_05ap9 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))


## Total periods served afterwards (unweighted), in any position

## governor's party

# all provinces
summary ((m02gov_06a1 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06a2 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06a3 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06a4 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06a5 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06a6 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06a7 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06a8 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06a9 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_06b1 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06b2 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06b3 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06b4 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06b5 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06b6 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06b7 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06b8 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06b9 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_06c1 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06c2 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06c3 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06c4 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06c5 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06c6 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06c7 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06c8 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06c9 <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02gov_06d1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06d2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06d3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06d5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06d6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06d7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06d8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06d9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_06e1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06e2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06e3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06e4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06e5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06e6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06e7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06e8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06e9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02gov_06f1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06f2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06f3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06f4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06f5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06f6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06f7 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06f8 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06f9 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, all provinces
summary ((m02gov_06g1 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06g2 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06g3 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06g4 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06g5 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06g6 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06g7 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06g8 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06g9 <- with (base.g[base.g$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02gov_06j1 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06j2 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06j3 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06j4 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06j5 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06j6 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06j7 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06j8 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06j9 <- with (base.g[base.g$anyBefore==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02gov_06m1 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06m2 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06m3 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06m4 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06m5 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06m6 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06m7 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06m8 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06m9 <- with (base.g[base.g$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02gov_06p1 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06p2 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06p3 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06p4 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06p5 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06p6 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06p7 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06p8 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06p9 <- with (base.g[base.g$largeMag2==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02gov_06s1 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06s2 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06s3 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06s4 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06s5 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06s6 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06s7 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06s8 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06s9 <- with (base.g[base.g$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02gov_06v1 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06v2 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06v3 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06v4 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06v5 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06v6 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06v7 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06v8 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06v9 <- with (base.g[base.g$largeMag2==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02gov_06aa1 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06aa2 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06aa3 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06aa4 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06aa5 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06aa6 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06aa7 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06aa8 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06aa9 <- with (base.g[base.g$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02gov_06ad1 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06ad2 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06ad3 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06ad4 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06ad5 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06ad6 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06ad7 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06ad8 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06ad9 <- with (base.g[base.g$firstTitular==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02gov_06ag1 <- with (base.g[base.g$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06ag2 <- with (base.g[base.g$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06ag3 <- with (base.g[base.g$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06ag4 <- with (base.g[base.g$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06ag5 <- with (base.g[base.g$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06ag6 <- with (base.g[base.g$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06ag7 <- with (base.g[base.g$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06ag8 <- with (base.g[base.g$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06ag9 <- with (base.g[base.g$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02gov_06aj1 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06aj2 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06aj3 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06aj4 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06aj5 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06aj6 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06aj7 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06aj8 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06aj9 <- with (base.g[base.g$female==1 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02gov_06am1 <- with (base.g[base.g$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06am2 <- with (base.g[base.g$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06am3 <- with (base.g[base.g$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06am4 <- with (base.g[base.g$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06am5 <- with (base.g[base.g$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06am6 <- with (base.g[base.g$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06am7 <- with (base.g[base.g$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06am8 <- with (base.g[base.g$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06am9 <- with (base.g[base.g$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02gov_06ap1 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06ap2 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06ap3 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_06ap4 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06ap5 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06ap6 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_06ap7 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06ap8 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02gov_06ap9 <- with (base.g[base.g$female==0 & base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))


## PJ

# all provinces
summary ((m02pj_06a1 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06a2 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06a3 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06a4 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06a5 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06a6 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06a7 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06a8 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06a9 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_06b1 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06b2 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06b3 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06b4 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06b5 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06b6 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06b7 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06b8 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06b9 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_06c1 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06c2 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06c3 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06c4 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06c5 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06c6 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06c7 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06c8 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06c9 <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02pj_06d1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06d2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06d3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06d5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06d6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06d7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06d8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06d9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_06e1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06e2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06e3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06e4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06e5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06e6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06e7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06e8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06e9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02pj_06f1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06f2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06f3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06f4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06f5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06f6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06f7 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06f8 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06f9 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, all provinces
summary ((m02pj_06g1 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06g2 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06g3 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06g4 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06g5 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06g6 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06g7 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06g8 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06g9 <- with (base.p[base.p$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02pj_06j1 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06j2 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06j3 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06j4 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06j5 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06j6 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06j7 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06j8 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06j9 <- with (base.p[base.p$anyBefore==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02pj_06m1 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06m2 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06m3 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06m4 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06m5 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06m6 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06m7 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06m8 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06m9 <- with (base.p[base.p$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02pj_06p1 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06p2 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06p3 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06p4 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06p5 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06p6 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06p7 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06p8 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06p9 <- with (base.p[base.p$largeMag2==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02pj_06s1 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06s2 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06s3 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06s4 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06s5 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06s6 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06s7 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06s8 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06s9 <- with (base.p[base.p$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02pj_06v1 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06v2 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06v3 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06v4 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06v5 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06v6 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06v7 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06v8 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06v9 <- with (base.p[base.p$largeMag2==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02pj_06aa1 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06aa2 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06aa3 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06aa4 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06aa5 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06aa6 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06aa7 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06aa8 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06aa9 <- with (base.p[base.p$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02pj_06ad1 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06ad2 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06ad3 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06ad4 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06ad5 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06ad6 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06ad7 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06ad8 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06ad9 <- with (base.p[base.p$firstTitular==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02pj_06ag1 <- with (base.p[base.p$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06ag2 <- with (base.p[base.p$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06ag3 <- with (base.p[base.p$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06ag4 <- with (base.p[base.p$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06ag5 <- with (base.p[base.p$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06ag6 <- with (base.p[base.p$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06ag7 <- with (base.p[base.p$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06ag8 <- with (base.p[base.p$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06ag9 <- with (base.p[base.p$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02pj_06aj1 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06aj2 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06aj3 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06aj4 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06aj5 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06aj6 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06aj7 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06aj8 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06aj9 <- with (base.p[base.p$female==1 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02pj_06am1 <- with (base.p[base.p$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06am2 <- with (base.p[base.p$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06am3 <- with (base.p[base.p$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06am4 <- with (base.p[base.p$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06am5 <- with (base.p[base.p$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06am6 <- with (base.p[base.p$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06am7 <- with (base.p[base.p$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06am8 <- with (base.p[base.p$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06am9 <- with (base.p[base.p$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02pj_06ap1 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06ap2 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06ap3 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_06ap4 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06ap5 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06ap6 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_06ap7 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06ap8 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02pj_06ap9 <- with (base.p[base.p$female==0 & base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))


## UCR

# all provinces
summary ((m02ucr_06a1 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06a2 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06a3 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06a4 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06a5 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06a6 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06a7 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06a8 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06a9 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_06b1 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06b2 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06b3 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06b4 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06b5 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06b6 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06b7 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06b8 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06b9 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_06c1 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06c2 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06c3 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06c4 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06c5 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06c6 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06c7 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06c8 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06c9 <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small provinces only
summary ((m02ucr_06d1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06d2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06d3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06d5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06d6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06d7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06d8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06d9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_06e1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06e2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06e3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06e4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06e5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06e6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06e7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06e8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06e9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=assumed, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

summary ((m02ucr_06f1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06f2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06f3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06f4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06f5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06f6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06f7 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06f8 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06f9 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=pWeight, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, all provinces
summary ((m02ucr_06g1 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06g2 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06g3 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06g4 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06g5 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06g6 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06g7 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06g8 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06g9 <- with (base.r[base.r$anyBefore==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# no previous experience, small provinces only
summary ((m02ucr_06j1 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06j2 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06j3 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06j4 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06j5 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06j6 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06j7 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06j8 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06j9 <- with (base.r[base.r$anyBefore==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, all provinces
summary ((m02ucr_06m1 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06m2 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06m3 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06m4 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06m5 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06m6 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06m7 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06m8 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06m9 <- with (base.r[base.r$largeMag2==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# large-magnitude elections, small provinces only
summary ((m02ucr_06p1 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06p2 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06p3 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06p4 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06p5 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06p6 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06p7 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06p8 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06p9 <- with (base.r[base.r$largeMag2==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, all provinces
summary ((m02ucr_06s1 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06s2 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06s3 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06s4 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06s5 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06s6 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06s7 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06s8 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06s9 <- with (base.r[base.r$largeMag2==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# small-magnitude elections, small provinces only
summary ((m02ucr_06v1 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06v2 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06v3 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06v4 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06v5 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06v6 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06v7 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06v8 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06v9 <- with (base.r[base.r$largeMag2==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, all provinces
summary ((m02ucr_06aa1 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06aa2 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06aa3 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06aa4 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06aa5 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06aa6 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06aa7 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06aa8 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06aa9 <- with (base.r[base.r$firstTitular==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# first-time candidates, small provinces only
summary ((m02ucr_06ad1 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06ad2 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06ad3 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06ad4 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06ad5 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06ad6 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06ad7 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06ad8 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06ad9 <- with (base.r[base.r$firstTitular==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, all provinces
summary ((m02ucr_06ag1 <- with (base.r[base.r$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06ag2 <- with (base.r[base.r$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06ag3 <- with (base.r[base.r$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06ag4 <- with (base.r[base.r$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06ag5 <- with (base.r[base.r$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06ag6 <- with (base.r[base.r$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06ag7 <- with (base.r[base.r$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06ag8 <- with (base.r[base.r$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06ag9 <- with (base.r[base.r$female==1,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# female candidates, small provinces only
summary ((m02ucr_06aj1 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06aj2 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06aj3 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06aj4 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06aj5 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06aj6 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06aj7 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06aj8 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06aj9 <- with (base.r[base.r$female==1 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, all provinces
summary ((m02ucr_06am1 <- with (base.r[base.r$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06am2 <- with (base.r[base.r$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06am3 <- with (base.r[base.r$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06am4 <- with (base.r[base.r$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06am5 <- with (base.r[base.r$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06am6 <- with (base.r[base.r$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06am7 <- with (base.r[base.r$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06am8 <- with (base.r[base.r$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06am9 <- with (base.r[base.r$female==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))

# male candidates, small provinces only
summary ((m02ucr_06ap1 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06ap2 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06ap3 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_06ap4 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06ap5 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06ap6 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_06ap7 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06ap8 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=2, q=3))))
summary ((m02ucr_06ap9 <- with (base.r[base.r$female==0 & base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=2, q=3))))



### Models reported in Table A2 (compliance)

## assumed at all

# governor's party
summary ((m01gov_01a4 <- with (base.g, rdrobust (y=assumed, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m01gov_01d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=assumed, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

# PJ
summary ((m01pj_01a4 <- with (base.p, rdrobust (y=assumed, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m01pj_01d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=assumed, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

# UCR
summary ((m01ucr_01a4 <- with (base.r, rdrobust (y=assumed, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m01ucr_01d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=assumed, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))


## proportion of 4-year mandate effectively served

# governor's party
summary ((m01gov_02a4 <- with (base.g, rdrobust (y=pWeight, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m01gov_02d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=pWeight, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

# PJ
summary ((m01pj_02a4 <- with (base.p, rdrobust (y=pWeight, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m01pj_02d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=pWeight, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

# UCR
summary ((m01ucr_02a4 <- with (base.r, rdrobust (y=pWeight, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m01ucr_02d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=pWeight, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))



### Models reported in Table A3 (balance checks)

## Served as legislator at any moment before (1) or not (0)

## governor's party
summary ((m04gov_01a4 <- with (base.g, rdrobust (y=legBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04gov_01d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=legBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## PJ
summary ((m04pj_01a4 <- with (base.p, rdrobust (y=legBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04pj_01d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=legBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m04ucr_01a4 <- with (base.r, rdrobust (y=legBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04ucr_01d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=legBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))


## Served as executive at any moment before (1) or not (0)

## governor's party
summary ((m04gov_02a4 <- with (base.g, rdrobust (y=exeBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04gov_02d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## PJ
summary ((m04pj_02a4 <- with (base.p, rdrobust (y=exeBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04pj_02d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m04ucr_02a4 <- with (base.r, rdrobust (y=exeBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04ucr_02d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))


## Served as legislator or executive at any moment before (1) or not (0)

## governor's party
summary ((m04gov_03a4 <- with (base.g, rdrobust (y=anyBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04gov_03d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## PJ
summary ((m04pj_03a4 <- with (base.p, rdrobust (y=anyBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04pj_03d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m04ucr_03a4 <- with (base.r, rdrobust (y=anyBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04ucr_03d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyBefore, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))


## Total periods served before (unweighted), in any position

## governor's party
summary ((m04gov_04a4 <- with (base.g, rdrobust (y=valBefore.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04gov_04d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=valBefore.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## PJ
summary ((m04pj_04a4 <- with (base.p, rdrobust (y=valBefore.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04pj_04d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=valBefore.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m04ucr_04a4 <- with (base.r, rdrobust (y=valBefore.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04ucr_04d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=valBefore.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))


## Female (1) or Male (0)

## governor's party
summary ((m04gov_05a4 <- with (base.g, rdrobust (y=female, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04gov_05d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=female, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## PJ
summary ((m04pj_05a4 <- with (base.p, rdrobust (y=female, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04pj_05d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=female, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m04ucr_05a4 <- with (base.r, rdrobust (y=female, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04ucr_05d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=female, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))


## President's party (1) or not (0)

## governor's party
summary ((m04gov_06a4 <- with (base.g, rdrobust (y=incPresi, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04gov_06d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=incPresi, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## PJ
summary ((m04pj_06a4 <- with (base.p, rdrobust (y=incPresi, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04pj_06d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=incPresi, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m04ucr_06a4 <- with (base.r, rdrobust (y=incPresi, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04ucr_06d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=incPresi, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))


## Position in party list

## governor's party
summary ((m04gov_07a4 <- with (base.g, rdrobust (y=position, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04gov_07d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=position, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## PJ
summary ((m04pj_07a4 <- with (base.p, rdrobust (y=position, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04pj_07d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=position, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m04ucr_07a4 <- with (base.r, rdrobust (y=position, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04ucr_07d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=position, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))


## Midterm election (1) or not (0)

## governor's party
summary ((m04gov_08a4 <- with (base.g, rdrobust (y=midterm, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04gov_08d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=midterm, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## PJ
summary ((m04pj_08a4 <- with (base.p, rdrobust (y=midterm, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04pj_08d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=midterm, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m04ucr_08a4 <- with (base.r, rdrobust (y=midterm, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04ucr_08d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=midterm, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))


## District magnitude (log)

## governor's party
summary ((m04gov_09a4 <- with (base.g, rdrobust (y=log (mag), x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04gov_09d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=log (mag), x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## PJ
summary ((m04pj_09a4 <- with (base.p, rdrobust (y=log (mag), x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04pj_09d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=log (mag), x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m04ucr_09a4 <- with (base.r, rdrobust (y=log (mag), x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04ucr_09d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=log (mag), x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))


## Large magnitude election (in province with odd number of representatives)

## governor's party
summary ((m04gov_10a4 <- with (base.g, rdrobust (y=largeMag2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04gov_10d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=largeMag2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## PJ
summary ((m04pj_10a4 <- with (base.p, rdrobust (y=largeMag2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04pj_10d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=largeMag2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m04ucr_10a4 <- with (base.r, rdrobust (y=largeMag2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m04ucr_10d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=largeMag2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))



### Models reported in Tables A4-A6 (power and sample size calculations)

## Renomination at either t+2 or t+4

## standard deviation of the outcome in the treatment and control groups
round (sd (filter (base.g, running<0)$renom), 2); round (sd (filter (base.g, running>1)$renom), 2) ## 0.32; 0.44
round (sd (filter (base.g, largeProv==0 & running<0)$renom), 2); round (sd (filter (base.g, largeProv==0 & running>1)$renom), 2) ## 0.31; 0.45
round (sd (filter (base.p, running<0)$renom), 2); round (sd (filter (base.p, running>1)$renom), 2) ## 0.33; 0.43
round (sd (filter (base.p, largeProv==0 & running<0)$renom), 2); round (sd (filter (base.p, largeProv==0 & running>1)$renom), 2) ## 0.32; 0.43
round (sd (filter (base.r, running<0)$renom), 2); round (sd (filter (base.r, running>1)$renom), 2) ## 0.37; 0.43
round (sd (filter (base.r, largeProv==0 & running<0)$renom), 2); round (sd (filter (base.r, largeProv==0 & running>1)$renom), 2) ## 0.36; 0.43

## governor's party

# all provinces
summary (m06gov_01a4a <- rdpower (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$renom)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5))) ## tau: 1/2SD Y in control group
summary (m06gov_01a4b <- rdpower (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$renom), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5))) ## tau: 1SD Y in control group
summary (m06gov_01a4c <- rdpower (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_01a4$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5))) ## tau: estimated effect
summary (m06gov_01a5a <- rdpower (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$renom)/2, covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01a5b <- rdpower (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$renom), covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01a5c <- rdpower (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_01a5$coef[1], covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01a7a <- rdpower (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$renom)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01a7b <- rdpower (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$renom), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01a7c <- rdpower (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02gov_01a7$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06gov_01a4samp01 <- rdsampsi (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$renom)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5))) ## tau: 1/2 SD of Y in control group
summary (m06gov_01a4samp02 <- rdsampsi (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$renom), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5))) ## tau: 1SD of Y in control group
summary (m06gov_01a4samp03 <- rdsampsi (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_01a4$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5))) ## tau estimated effect
summary (m06gov_01a5samp01 <- rdsampsi (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$renom)/2, covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01a5samp02 <- rdsampsi (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$renom), covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01a5samp03 <- rdsampsi (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_01a5$coef[1], covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01a7samp01 <- rdsampsi (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$renom)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01a7samp02 <- rdsampsi (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$renom), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01a7samp03 <- rdsampsi (data=base.g[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02gov_01a7$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06gov_01d4a <- rdpower (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$renom)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d4b <- rdpower (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$renom), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d4c <- rdpower (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_01d4$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d5a <- rdpower (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$renom)/2, covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d5b <- rdpower (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$renom), covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d5c <- rdpower (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_01d5$coef[1], covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d7a <- rdpower (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$renom)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d7b <- rdpower (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$renom), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d7c <- rdpower (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02gov_01d7$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06gov_01d4samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$renom)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d4samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$renom), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d4samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_01d4$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d5samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$renom)/2, covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d5samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$renom), covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d5samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_01d5$coef[1], covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d7samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$renom)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d7samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$renom), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_01d7samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02gov_01d7$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))


## PJ

# all provinces
summary (m06pj_01a4a <- rdpower (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$renom)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a4b <- rdpower (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$renom), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a4c <- rdpower (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_01a4$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a5a <- rdpower (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$renom)/2, covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a5b <- rdpower (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$renom), covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a5c <- rdpower (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_01a5$coef[1], covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a7a <- rdpower (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$renom)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a7b <- rdpower (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$renom), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a7c <- rdpower (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02pj_01a7$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06pj_01a4samp01 <- rdsampsi (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$renom)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a4samp02 <- rdsampsi (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$renom), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a4samp03 <- rdsampsi (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_01a4$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a5samp01 <- rdsampsi (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$renom)/2, covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a5samp02 <- rdsampsi (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$renom), covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a5samp03 <- rdsampsi (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_01a5$coef[1], covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a7samp01 <- rdsampsi (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$renom)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a7samp02 <- rdsampsi (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$renom), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01a7samp03 <- rdsampsi (data=base.p[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02pj_01a7$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06pj_01d4a <- rdpower (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$renom)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d4b <- rdpower (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$renom), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d4c <- rdpower (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_01d4$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d5a <- rdpower (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$renom)/2, covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d5b <- rdpower (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$renom), covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d5c <- rdpower (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_01d5$coef[1], covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d7a <- rdpower (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$renom)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d7b <- rdpower (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$renom), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d7c <- rdpower (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02pj_01d7$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06pj_01d4samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$renom)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d4samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$renom), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d4samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_01d4$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d5samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$renom)/2, covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d5samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$renom), covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d5samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_01d5$coef[1], covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d7samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$renom)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d7samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$renom), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_01d7samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02pj_01d7$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))


## UCR

# all provinces
summary (m06ucr_01a4a <- rdpower (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$renom)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a4b <- rdpower (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$renom), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a4c <- rdpower (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_01a4$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a5a <- rdpower (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$renom)/2, covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a5b <- rdpower (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$renom), covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a5c <- rdpower (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_01a5$coef[1], covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a7a <- rdpower (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$renom)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a7b <- rdpower (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$renom), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a7c <- rdpower (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02ucr_01a7$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06ucr_01a4samp01 <- rdsampsi (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$renom)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a4samp02 <- rdsampsi (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$renom), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a4samp03 <- rdsampsi (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_01a4$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a5samp01 <- rdsampsi (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$renom)/2, covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a5samp02 <- rdsampsi (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$renom), covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a5samp03 <- rdsampsi (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_01a5$coef[1], covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a7samp01 <- rdsampsi (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$renom)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a7samp02 <- rdsampsi (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$renom), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01a7samp03 <- rdsampsi (data=base.r[,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02ucr_01a7$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06ucr_01d4a <- rdpower (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$renom)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d4b <- rdpower (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$renom), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d4c <- rdpower (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_01d4$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d5a <- rdpower (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$renom)/2, covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d5b <- rdpower (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$renom), covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d5c <- rdpower (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_01d5$coef[1], covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d7a <- rdpower (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$renom)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d7b <- rdpower (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$renom), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d7c <- rdpower (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02ucr_01d7$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06ucr_01d4samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$renom)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d4samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$renom), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d4samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_01d4$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d5samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$renom)/2, covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d5samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$renom), covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d5samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_01d5$coef[1], covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d7samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$renom)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d7samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$renom), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_01d7samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("renom", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02ucr_01d7$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))


## Served as legislator at any moment afterwards (1) or not (0)

## standard deviation of the outcome in the treatment and control groups
round (sd (filter (base.g, running<0)$legAfter), 2); round (sd (filter (base.g, running>1)$legAfter), 2) ## 0.36; 0.46
round (sd (filter (base.g, largeProv==0 & running<0)$legAfter), 2); round (sd (filter (base.g, largeProv==0 & running>1)$legAfter), 2) ## 0.34; 0.46
round (sd (filter (base.p, running<0)$legAfter), 2); round (sd (filter (base.p, running>1)$legAfter), 2) ## 0.37; 0.47
round (sd (filter (base.p, largeProv==0 & running<0)$legAfter), 2); round (sd (filter (base.p, largeProv==0 & running>1)$legAfter), 2) ## 0.37; 0.47
round (sd (filter (base.r, running<0)$legAfter), 2); round (sd (filter (base.r, running>1)$legAfter), 2) ## 0.34; 0.43
round (sd (filter (base.r, largeProv==0 & running<0)$legAfter), 2); round (sd (filter (base.r, largeProv==0 & running>1)$legAfter), 2) ## 0.31; 0.43


## governor's party

# all provinces
summary (m06gov_02a4a <- rdpower (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$legAfter)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a4b <- rdpower (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$legAfter), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a4c <- rdpower (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_02a4$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a5a <- rdpower (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$legAfter)/2, covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a5b <- rdpower (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$legAfter), covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a5c <- rdpower (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_02a5$coef[1], covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a7a <- rdpower (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$legAfter)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a7b <- rdpower (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$legAfter), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a7c <- rdpower (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02gov_02a7$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06gov_02a4samp01 <- rdsampsi (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$legAfter)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a4samp02 <- rdsampsi (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$legAfter), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a4samp03 <- rdsampsi (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_02a4$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a5samp01 <- rdsampsi (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$legAfter)/2, covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a5samp02 <- rdsampsi (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$legAfter), covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a5samp03 <- rdsampsi (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_02a5$coef[1], covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a7samp01 <- rdsampsi (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$legAfter)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a7samp02 <- rdsampsi (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$legAfter), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02a7samp03 <- rdsampsi (data=base.g[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02gov_02a7$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06gov_02d4a <- rdpower (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$legAfter)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d4b <- rdpower (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$legAfter), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d4c <- rdpower (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_02d4$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d5a <- rdpower (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$legAfter)/2, covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d5b <- rdpower (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$legAfter), covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d5c <- rdpower (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_02d5$coef[1], covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d7a <- rdpower (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$legAfter)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d7b <- rdpower (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$legAfter), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d7c <- rdpower (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02gov_02d7$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06gov_02d4samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$legAfter)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d4samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$legAfter), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d4samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_02d4$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d5samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$legAfter)/2, covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d5samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$legAfter), covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d5samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_02d5$coef[1], covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d7samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$legAfter)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d7samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$legAfter), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_02d7samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02gov_02d7$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))


## PJ

# all provinces
summary (m06pj_02a4a <- rdpower (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$legAfter)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a4b <- rdpower (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$legAfter), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a4c <- rdpower (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_02a4$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a5a <- rdpower (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$legAfter)/2, covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a5b <- rdpower (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$legAfter), covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a5c <- rdpower (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_02a5$coef[1], covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a7a <- rdpower (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$legAfter)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a7b <- rdpower (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$legAfter), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a7c <- rdpower (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02pj_02a7$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06pj_02a4samp01 <- rdsampsi (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$legAfter)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a4samp02 <- rdsampsi (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$legAfter), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a4samp03 <- rdsampsi (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_02a4$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a5samp01 <- rdsampsi (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$legAfter)/2, covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a5samp02 <- rdsampsi (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$legAfter), covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a5samp03 <- rdsampsi (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_02a5$coef[1], covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a7samp01 <- rdsampsi (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$legAfter)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a7samp02 <- rdsampsi (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$legAfter), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02a7samp03 <- rdsampsi (data=base.p[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02pj_02a7$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06pj_02d4a <- rdpower (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$legAfter)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d4b <- rdpower (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$legAfter), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d4c <- rdpower (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_02d4$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d5a <- rdpower (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$legAfter)/2, covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d5b <- rdpower (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$legAfter), covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d5c <- rdpower (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_02d5$coef[1], covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d7a <- rdpower (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$legAfter)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d7b <- rdpower (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$legAfter), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d7c <- rdpower (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02pj_02d7$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06pj_02d4samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$legAfter)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d4samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$legAfter), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d4samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_02d4$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d5samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$legAfter)/2, covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d5samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$legAfter), covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d5samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_02d5$coef[1], covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d7samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$legAfter)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d7samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$legAfter), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_02d7samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02pj_02d7$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))


## UCR

# all provinces
summary (m06ucr_02a4a <- rdpower (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$legAfter)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a4b <- rdpower (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$legAfter), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a4c <- rdpower (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_02a4$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a5a <- rdpower (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$legAfter)/2, covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a5b <- rdpower (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$legAfter), covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a5c <- rdpower (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_02a5$coef[1], covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a7a <- rdpower (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$legAfter)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a7b <- rdpower (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$legAfter), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a7c <- rdpower (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02ucr_02a7$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06ucr_02a4samp01 <- rdsampsi (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$legAfter)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a4samp02 <- rdsampsi (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$legAfter), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a4samp03 <- rdsampsi (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_02a4$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a5samp01 <- rdsampsi (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$legAfter)/2, covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a5samp02 <- rdsampsi (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$legAfter), covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a5samp03 <- rdsampsi (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_02a5$coef[1], covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a7samp01 <- rdsampsi (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$legAfter)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a7samp02 <- rdsampsi (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$legAfter), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02a7samp03 <- rdsampsi (data=base.r[,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02ucr_02a7$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06ucr_02d4a <- rdpower (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$legAfter)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d4b <- rdpower (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$legAfter), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d4c <- rdpower (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_02d4$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d5a <- rdpower (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$legAfter)/2, covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d5b <- rdpower (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$legAfter), covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d5c <- rdpower (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_02d5$coef[1], covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d7a <- rdpower (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$legAfter)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d7b <- rdpower (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$legAfter), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d7c <- rdpower (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02ucr_02d7$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06ucr_02d4samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$legAfter)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d4samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$legAfter), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d4samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_02d4$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d5samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$legAfter)/2, covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d5samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$legAfter), covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d5samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_02d5$coef[1], covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d7samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$legAfter)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d7samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$legAfter), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_02d7samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("legAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02ucr_02d7$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))


## Served as executive at any moment afterwards (1) or not (0)

# standard deviation of the outcome in the treatment and control groups
round (sd (filter (base.g, running<0)$exeAfter), 2); round (sd (filter (base.g, running>1)$exeAfter), 2) ## 0.27; 0.23
round (sd (filter (base.g, largeProv==0 & running<0)$exeAfter), 2); round (sd (filter (base.g, largeProv==0 & running>1)$exeAfter), 2) ## 0.27; 0.24
round (sd (filter (base.p, running<0)$exeAfter), 2); round (sd (filter (base.p, running>1)$exeAfter), 2) ## 0.28; 0.27
round (sd (filter (base.p, largeProv==0 & running<0)$exeAfter), 2); round (sd (filter (base.p, largeProv==0 & running>1)$exeAfter), 2) ## 0.28; 0.27
round (sd (filter (base.r, running<0)$exeAfter), 2); round (sd (filter (base.r, running>1)$exeAfter), 2) ## 0.27; 0.24
round (sd (filter (base.r, largeProv==0 & running<0)$exeAfter), 2); round (sd (filter (base.r, largeProv==0 & running>1)$exeAfter), 2) ## 0.27; 0.25


## governor's party

# all provinces
summary (m06gov_03a4a <- rdpower (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$exeAfter)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a4b <- rdpower (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$exeAfter), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a4c <- rdpower (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_03a4$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a5a <- rdpower (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$exeAfter)/2, covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a5b <- rdpower (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$exeAfter), covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a5c <- rdpower (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_03a5$coef[1], covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a7a <- rdpower (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$exeAfter)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a7b <- rdpower (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$exeAfter), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a7c <- rdpower (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02gov_03a7$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06gov_03a4samp01 <- rdsampsi (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$exeAfter)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a4samp02 <- rdsampsi (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$exeAfter), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a4samp03 <- rdsampsi (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_03a4$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a5samp01 <- rdsampsi (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$exeAfter)/2, covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a5samp02 <- rdsampsi (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$exeAfter), covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a5samp03 <- rdsampsi (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_03a5$coef[1], covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a7samp01 <- rdsampsi (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$exeAfter)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a7samp02 <- rdsampsi (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$exeAfter), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03a7samp03 <- rdsampsi (data=base.g[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02gov_03a7$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06gov_03d4a <- rdpower (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$exeAfter)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d4b <- rdpower (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$exeAfter), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d4c <- rdpower (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_03d4$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d5a <- rdpower (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$exeAfter)/2, covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d5b <- rdpower (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$exeAfter), covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d5c <- rdpower (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_03d5$coef[1], covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d7a <- rdpower (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$exeAfter)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d7b <- rdpower (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$exeAfter), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d7c <- rdpower (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02gov_03d7$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06gov_03d4samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$exeAfter)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d4samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$exeAfter), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d4samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_03d4$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d5samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$exeAfter)/2, covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d5samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$exeAfter), covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d5samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_03d5$coef[1], covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d7samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$exeAfter)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d7samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$exeAfter), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_03d7samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02gov_03d7$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))


## PJ

# all provinces
summary (m06pj_03a4a <- rdpower (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$exeAfter)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a4b <- rdpower (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$exeAfter), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a4c <- rdpower (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_03a4$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a5a <- rdpower (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$exeAfter)/2, covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a5b <- rdpower (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$exeAfter), covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a5c <- rdpower (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_03a5$coef[1], covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a7a <- rdpower (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$exeAfter)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a7b <- rdpower (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$exeAfter), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a7c <- rdpower (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02pj_03a7$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06pj_03a4samp01 <- rdsampsi (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$exeAfter)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a4samp02 <- rdsampsi (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$exeAfter), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a4samp03 <- rdsampsi (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_03a4$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a5samp01 <- rdsampsi (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$exeAfter)/2, covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a5samp02 <- rdsampsi (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$exeAfter), covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a5samp03 <- rdsampsi (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_03a5$coef[1], covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a7samp01 <- rdsampsi (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$exeAfter)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03a7samp02 <- rdsampsi (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$exeAfter), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
# summary (m06pj_03a7samp03 <- rdsampsi (data=base.p[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02pj_03a7$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06pj_03d4a <- rdpower (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$exeAfter)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d4b <- rdpower (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$exeAfter), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d4c <- rdpower (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_03d4$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d5a <- rdpower (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$exeAfter)/2, covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d5b <- rdpower (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$exeAfter), covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d5c <- rdpower (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_03d5$coef[1], covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d7a <- rdpower (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$exeAfter)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d7b <- rdpower (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$exeAfter), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d7c <- rdpower (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02pj_03d7$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06pj_03d4samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$exeAfter)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d4samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$exeAfter), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d4samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_03d4$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d5samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$exeAfter)/2, covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d5samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$exeAfter), covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d5samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_03d5$coef[1], covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d7samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$exeAfter)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d7samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$exeAfter), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_03d7samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02pj_03d7$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))


## UCR

# all provinces
summary (m06ucr_03a4a <- rdpower (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$exeAfter)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a4b <- rdpower (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$exeAfter), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a4c <- rdpower (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_03a4$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a5a <- rdpower (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$exeAfter)/2, covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a5b <- rdpower (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$exeAfter), covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a5c <- rdpower (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_03a5$coef[1], covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a7a <- rdpower (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$exeAfter)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a7b <- rdpower (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$exeAfter), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a7c <- rdpower (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02ucr_03a7$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06ucr_03a4samp01 <- rdsampsi (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$exeAfter)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a4samp02 <- rdsampsi (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$exeAfter), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a4samp03 <- rdsampsi (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_03a4$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a5samp01 <- rdsampsi (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$exeAfter)/2, covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a5samp02 <- rdsampsi (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$exeAfter), covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a5samp03 <- rdsampsi (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_03a5$coef[1], covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a7samp01 <- rdsampsi (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$exeAfter)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a7samp02 <- rdsampsi (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$exeAfter), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03a7samp03 <- rdsampsi (data=base.r[,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02ucr_03a7$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06ucr_03d4a <- rdpower (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$exeAfter)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d4b <- rdpower (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$exeAfter), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d4c <- rdpower (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_03d4$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d5a <- rdpower (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$exeAfter)/2, covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d5b <- rdpower (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$exeAfter), covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d5c <- rdpower (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_03d5$coef[1], covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d7a <- rdpower (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$exeAfter)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d7b <- rdpower (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$exeAfter), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d7c <- rdpower (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02ucr_03d7$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06ucr_03d4samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$exeAfter)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d4samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$exeAfter), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d4samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_03d4$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d5samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$exeAfter)/2, covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d5samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$exeAfter), covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d5samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_03d5$coef[1], covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d7samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$exeAfter)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d7samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$exeAfter), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_03d7samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("exeAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02ucr_03d7$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))


## Served as legislator OR executive at any moment afterwards (1) or not (0)

# standard deviation of the outcome in the treatment and control groups
round (sd (filter (base.g, running<0)$anyAfter), 2); round (sd (filter (base.g, running>1)$anyAfter), 2) ## 0.40; 0.47
round (sd (filter (base.g, largeProv==0 & running<0)$anyAfter), 2); round (sd (filter (base.g, largeProv==0 & running>1)$anyAfter), 2) ## 0.39; 0.47
round (sd (filter (base.p, running<0)$anyAfter), 2); round (sd (filter (base.p, running>1)$anyAfter), 2) ## 0.40; 0.48
round (sd (filter (base.p, largeProv==0 & running<0)$anyAfter), 2); round (sd (filter (base.p, largeProv==0 & running>1)$anyAfter), 2) ## 0.39; 0.48
round (sd (filter (base.r, running<0)$anyAfter), 2); round (sd (filter (base.r, running>1)$anyAfter), 2) ## 0.41; 0.45
round (sd (filter (base.r, largeProv==0 & running<0)$anyAfter), 2); round (sd (filter (base.r, largeProv==0 & running>1)$anyAfter), 2) ## 0.39; 0.45


## governor's party

# all provinces
summary (m06gov_04a4a <- rdpower (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$anyAfter)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a4b <- rdpower (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$anyAfter), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a4c <- rdpower (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_05a4$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a5a <- rdpower (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$anyAfter)/2, covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a5b <- rdpower (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$anyAfter), covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a5c <- rdpower (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_05a5$coef[1], covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a7a <- rdpower (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$anyAfter)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a7b <- rdpower (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$anyAfter), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a7c <- rdpower (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02gov_05a7$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06gov_04a4samp01 <- rdsampsi (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$anyAfter)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a4samp02 <- rdsampsi (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$anyAfter), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a4samp03 <- rdsampsi (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_05a4$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a5samp01 <- rdsampsi (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$anyAfter)/2, covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a5samp02 <- rdsampsi (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$anyAfter), covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a5samp03 <- rdsampsi (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_05a5$coef[1], covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a7samp01 <- rdsampsi (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$anyAfter)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a7samp02 <- rdsampsi (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$anyAfter), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04a7samp03 <- rdsampsi (data=base.g[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02gov_05a7$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06gov_04d4a <- rdpower (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$anyAfter)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d4b <- rdpower (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$anyAfter), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d4c <- rdpower (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_05d4$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d5a <- rdpower (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$anyAfter)/2, covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d5b <- rdpower (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$anyAfter), covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d5c <- rdpower (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_05d5$coef[1], covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d7a <- rdpower (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$anyAfter)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d7b <- rdpower (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$anyAfter), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d7c <- rdpower (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02gov_05d7$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06gov_04d4samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$anyAfter)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d4samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$anyAfter), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d4samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_05d4$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d5samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$anyAfter)/2, covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d5samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$anyAfter), covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d5samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_05d5$coef[1], covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d7samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$anyAfter)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d7samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$anyAfter), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_04d7samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02gov_05d7$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))


## PJ

# all provinces
summary (m06pj_04a4a <- rdpower (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$anyAfter)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a4b <- rdpower (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$anyAfter), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a4c <- rdpower (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_05a4$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a5a <- rdpower (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$anyAfter)/2, covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a5b <- rdpower (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$anyAfter), covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a5c <- rdpower (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_05a5$coef[1], covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a7a <- rdpower (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$anyAfter)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a7b <- rdpower (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$anyAfter), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a7c <- rdpower (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02pj_05a7$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06pj_04a4samp01 <- rdsampsi (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$anyAfter)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a4samp02 <- rdsampsi (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$anyAfter), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a4samp03 <- rdsampsi (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_05a4$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a5samp01 <- rdsampsi (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$anyAfter)/2, covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a5samp02 <- rdsampsi (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$anyAfter), covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a5samp03 <- rdsampsi (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_05a5$coef[1], covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a7samp01 <- rdsampsi (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$anyAfter)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a7samp02 <- rdsampsi (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$anyAfter), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04a7samp03 <- rdsampsi (data=base.p[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02pj_05a7$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06pj_04d4a <- rdpower (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$anyAfter)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d4b <- rdpower (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$anyAfter), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d4c <- rdpower (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_05d4$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d5a <- rdpower (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$anyAfter)/2, covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d5b <- rdpower (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$anyAfter), covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d5c <- rdpower (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_05d5$coef[1], covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d7a <- rdpower (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$anyAfter)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d7b <- rdpower (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$anyAfter), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d7c <- rdpower (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02pj_05d7$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06pj_04d4samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$anyAfter)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d4samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$anyAfter), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d4samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_05d4$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d5samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$anyAfter)/2, covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d5samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$anyAfter), covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d5samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_05d5$coef[1], covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d7samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$anyAfter)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d7samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$anyAfter), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_04d7samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02pj_05d7$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))


## UCR

# all provinces
summary (m06ucr_04a4a <- rdpower (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$anyAfter)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a4b <- rdpower (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$anyAfter), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a4c <- rdpower (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_05a4$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a5a <- rdpower (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$anyAfter)/2, covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a5b <- rdpower (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$anyAfter), covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a5c <- rdpower (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_05a5$coef[1], covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a7a <- rdpower (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$anyAfter)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a7b <- rdpower (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$anyAfter), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a7c <- rdpower (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02ucr_05a7$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06ucr_04a4samp01 <- rdsampsi (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$anyAfter)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a4samp02 <- rdsampsi (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$anyAfter), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a4samp03 <- rdsampsi (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_05a4$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a5samp01 <- rdsampsi (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$anyAfter)/2, covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a5samp02 <- rdsampsi (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$anyAfter), covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a5samp03 <- rdsampsi (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_05a5$coef[1], covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a7samp01 <- rdsampsi (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$anyAfter)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a7samp02 <- rdsampsi (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$anyAfter), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04a7samp03 <- rdsampsi (data=base.r[,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02ucr_05a7$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06ucr_04d4a <- rdpower (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$anyAfter)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d4b <- rdpower (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$anyAfter), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d4c <- rdpower (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_05d4$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d5a <- rdpower (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$anyAfter)/2, covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d5b <- rdpower (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$anyAfter), covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d5c <- rdpower (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_05d5$coef[1], covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d7a <- rdpower (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$anyAfter)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d7b <- rdpower (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$anyAfter), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d7c <- rdpower (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02ucr_05d7$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06ucr_04d4samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$anyAfter)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d4samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$anyAfter), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d4samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_05d4$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d5samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$anyAfter)/2, covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d5samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$anyAfter), covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d5samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_05d5$coef[1], covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d7samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$anyAfter)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d7samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$anyAfter), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_04d7samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("anyAfter", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02ucr_05d7$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))


## Total periods served afterwards (unweighted), in any position

# standard deviation of the outcome in the treatment and control groups
round (sd (filter (base.g, running<0)$valAfter.eq), 2); round (sd (filter (base.g, running>1)$valAfter.eq), 2) ## 0.84; 0.89
round (sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq), 2); round (sd (filter (base.g, largeProv==0 & running>1)$valAfter.eq), 2) ## 0.86; 0.90
round (sd (filter (base.p, running<0)$valAfter.eq), 2); round (sd (filter (base.p, running>1)$valAfter.eq), 2) ## 1.08; 1.04
round (sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq), 2); round (sd (filter (base.p, largeProv==0 & running>1)$valAfter.eq), 2) ## 1.14; 1.04
round (sd (filter (base.r, running<0)$valAfter.eq), 2); round (sd (filter (base.r, running>1)$valAfter.eq), 2) ## 0.82; 0.95
round (sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq), 2); round (sd (filter (base.r, largeProv==0 & running>1)$valAfter.eq), 2) ## 0.84; 0.96


## governor's party

# all provinces
summary (m06gov_05a4a <- rdpower (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$valAfter.eq)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a4b <- rdpower (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$valAfter.eq), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a4c <- rdpower (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_06a4$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a5a <- rdpower (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$valAfter.eq)/2, covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a5b <- rdpower (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$valAfter.eq), covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a5c <- rdpower (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_06a5$coef[1], covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a7a <- rdpower (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$valAfter.eq)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a7b <- rdpower (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$valAfter.eq), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a7c <- rdpower (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02gov_06a7$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06gov_05a4samp01 <- rdsampsi (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$valAfter.eq)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a4samp02 <- rdsampsi (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$valAfter.eq), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a4samp03 <- rdsampsi (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_06a4$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a5samp01 <- rdsampsi (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$valAfter.eq)/2, covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a5samp02 <- rdsampsi (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, running<0)$valAfter.eq), covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a5samp03 <- rdsampsi (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_06a5$coef[1], covs=base.g[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a7samp01 <- rdsampsi (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$valAfter.eq)/2, covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a7samp02 <- rdsampsi (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, running<0)$valAfter.eq), covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05a7samp03 <- rdsampsi (data=base.g[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02gov_06a7$coef[1], covs=NULL, cluster=base.g$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06gov_05d4a <- rdpower (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d4b <- rdpower (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d4c <- rdpower (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_06d4$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d5a <- rdpower (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq)/2, covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d5b <- rdpower (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq), covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d5c <- rdpower (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02gov_06d5$coef[1], covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d7a <- rdpower (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d7b <- rdpower (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d7c <- rdpower (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02gov_06d7$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06gov_05d4samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d4samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d4samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_06d4$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d5samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq)/2, covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d5samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq), covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d5samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02gov_06d5$coef[1], covs=base.g[base.g$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d7samp01 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq)/2, covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d7samp02 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq), covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06gov_05d7samp03 <- rdsampsi (data=base.g[base.g$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02gov_06d7$coef[1], covs=NULL, cluster=base.g[base.g$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))


## PJ

# all provinces
summary (m06pj_05a4a <- rdpower (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$valAfter.eq)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a4b <- rdpower (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$valAfter.eq), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a4c <- rdpower (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_06a4$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a5a <- rdpower (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$valAfter.eq)/2, covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a5b <- rdpower (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$valAfter.eq), covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a5c <- rdpower (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_06a5$coef[1], covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a7a <- rdpower (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$valAfter.eq)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a7b <- rdpower (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$valAfter.eq), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a7c <- rdpower (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02pj_06a7$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06pj_05a4samp01 <- rdsampsi (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$valAfter.eq)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a4samp02 <- rdsampsi (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$valAfter.eq), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a4samp03 <- rdsampsi (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_06a4$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a5samp01 <- rdsampsi (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$valAfter.eq)/2, covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a5samp02 <- rdsampsi (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, running<0)$valAfter.eq), covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a5samp03 <- rdsampsi (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_06a5$coef[1], covs=base.p[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a7samp01 <- rdsampsi (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$valAfter.eq)/2, covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a7samp02 <- rdsampsi (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, running<0)$valAfter.eq), covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05a7samp03 <- rdsampsi (data=base.p[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02pj_06a7$coef[1], covs=NULL, cluster=base.p$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06pj_05d4a <- rdpower (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d4b <- rdpower (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d4c <- rdpower (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_06d4$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d5a <- rdpower (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq)/2, covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d5b <- rdpower (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq), covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d5c <- rdpower (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02pj_06d5$coef[1], covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d7a <- rdpower (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d7b <- rdpower (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d7c <- rdpower (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02pj_06d7$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06pj_05d4samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d4samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d4samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_06d4$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d5samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq)/2, covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d5samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq), covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d5samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02pj_06d5$coef[1], covs=base.p[base.p$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02")], cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d7samp01 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq)/2, covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d7samp02 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq), covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06pj_05d7samp03 <- rdsampsi (data=base.p[base.p$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02pj_06d7$coef[1], covs=NULL, cluster=base.p[base.p$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))


## UCR

# all provinces
summary (m06ucr_05a4a <- rdpower (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$valAfter.eq)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a4b <- rdpower (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$valAfter.eq), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a4c <- rdpower (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_06a4$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a5a <- rdpower (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$valAfter.eq)/2, covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a5b <- rdpower (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$valAfter.eq), covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a5c <- rdpower (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_06a5$coef[1], covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a7a <- rdpower (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$valAfter.eq)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a7b <- rdpower (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$valAfter.eq), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a7c <- rdpower (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02ucr_06a7$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06ucr_05a4samp01 <- rdsampsi (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$valAfter.eq)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a4samp02 <- rdsampsi (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$valAfter.eq), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a4samp03 <- rdsampsi (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_06a4$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a5samp01 <- rdsampsi (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$valAfter.eq)/2, covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a5samp02 <- rdsampsi (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, running<0)$valAfter.eq), covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a5samp03 <- rdsampsi (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_06a5$coef[1], covs=base.r[,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03", "position04")], cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a7samp01 <- rdsampsi (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$valAfter.eq)/2, covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a7samp02 <- rdsampsi (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, running<0)$valAfter.eq), covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05a7samp03 <- rdsampsi (data=base.r[,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02ucr_06a7$coef[1], covs=NULL, cluster=base.r$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# small provinces only
summary (m06ucr_05d4a <- rdpower (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d4b <- rdpower (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d4c <- rdpower (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_06d4$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d5a <- rdpower (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq)/2, covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d5b <- rdpower (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq), covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d5c <- rdpower (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=1, q=2, tau=m02ucr_06d5$coef[1], covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d7a <- rdpower (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d7b <- rdpower (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d7c <- rdpower (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, level=95, p=2, q=3, tau=m02ucr_06d7$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))

# sample sizes
summary (m06ucr_05d4samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d4samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d4samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_06d4$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d5samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq)/2, covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d5samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq), covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d5samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=1, q=2, tau=m02ucr_06d5$coef[1], covs=base.r[base.r$largeProv==0,c ("female", "anyBefore", "midterm", "equalMag", "largeMag", "position01", "position02", "position03")], cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d7samp01 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq)/2, covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d7samp02 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq), covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))
summary (m06ucr_05d7samp03 <- rdsampsi (data=base.r[base.r$largeProv==0,c ("valAfter.eq", "running")], cutoff=0, alpha=0.05, beta=0.8, level=95, p=2, q=3, tau=m02ucr_06d7$coef[1], covs=NULL, cluster=base.r[base.r$largeProv==0,]$district, plot=FALSE, graph.range=c (-0.5, 0.5)))



### Models reported in Table A7

## Mayor afterwards (1) or not (0)

## governor's party

# all provinces
summary ((m02gov_07a1 <- with (base.g, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_07a2 <- with (base.g, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_07a3 <- with (base.g, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_07a4 <- with (base.g, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_07a5 <- with (base.g, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_07a6 <- with (base.g, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

# small provinces only
summary ((m02gov_07d1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_07d2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_07d3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_07d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_07d5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_07d6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## PJ

# all provinces
summary ((m02pj_07a1 <- with (base.p, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_07a2 <- with (base.p, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_07a3 <- with (base.p, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_07a4 <- with (base.p, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_07a5 <- with (base.p, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_07a6 <- with (base.p, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

# small provinces only
summary ((m02pj_07d1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_07d2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_07d3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_07d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_07d5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_07d6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## UCR

# all provinces
summary ((m02ucr_07a1 <- with (base.r, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_07a2 <- with (base.r, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_07a3 <- with (base.r, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_07a4 <- with (base.r, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_07a5 <- with (base.r, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_07a6 <- with (base.r, rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

# small provinces only
summary ((m02ucr_07d1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_07d2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_07d3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_07d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_07d5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_07d6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=mayor.a, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## Served as (vice-)president, (vice-)governor or national minister afterwards (1) or not (0)

## governor's party

# all provinces
summary ((m02gov_04a1 <- with (base.g, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_04a2 <- with (base.g, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_04a3 <- with (base.g, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_04a4 <- with (base.g, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_04a5 <- with (base.g, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_04a6 <- with (base.g, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

# small provinces only
summary ((m02gov_04d1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_04d2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_04d3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_04d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_04d5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_04d6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## PJ

# all provinces
summary ((m02pj_04a1 <- with (base.p, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_04a2 <- with (base.p, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_04a3 <- with (base.p, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_04a4 <- with (base.p, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_04a5 <- with (base.p, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_04a6 <- with (base.p, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

# small provinces only
summary ((m02pj_04d1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_04d2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_04d3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_04d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_04d5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_04d6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## UCR

# all provinces
summary ((m02ucr_04a1 <- with (base.r, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_04a2 <- with (base.r, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_04a3 <- with (base.r, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_04a4 <- with (base.r, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_04a5 <- with (base.r, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_04a6 <- with (base.r, rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

# small provinces only
summary ((m02ucr_04d1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_04d2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_04d3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_04d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_04d5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_04d6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## An equally valuable position afterwards (1) or not (0)

## governor's party

# all provinces
summary ((m02gov_08a1 <- with (base.g, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_08a2 <- with (base.g, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_08a3 <- with (base.g, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_08a4 <- with (base.g, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_08a5 <- with (base.g, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_08a6 <- with (base.g, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

# small provinces only
summary ((m02gov_08d1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_08d2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_08d3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_08d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_08d5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_08d6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## PJ

# all provinces
summary ((m02pj_08a1 <- with (base.p, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_08a2 <- with (base.p, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_08a3 <- with (base.p, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_08a4 <- with (base.p, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_08a5 <- with (base.p, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_08a6 <- with (base.p, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

# small provinces only
summary ((m02pj_08d1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_08d2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_08d3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_08d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_08d5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_08d6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## UCR

# all provinces
summary ((m02ucr_08a1 <- with (base.r, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_08a2 <- with (base.r, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_08a3 <- with (base.r, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_08a4 <- with (base.r, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_08a5 <- with (base.r, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_08a6 <- with (base.r, rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

# small provinces only
summary ((m02ucr_08d1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_08d2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_08d3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_08d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_08d5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_08d6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=sameAfter, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## A more valuable position afterwards (1) or not (0)

## governor's party

# all provinces
summary ((m02gov_09a1 <- with (base.g, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_09a2 <- with (base.g, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_09a3 <- with (base.g, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_09a4 <- with (base.g, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_09a5 <- with (base.g, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_09a6 <- with (base.g, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

# small provinces only
summary ((m02gov_09d1 <- with (base.g[base.g$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_09d2 <- with (base.g[base.g$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_09d3 <- with (base.g[base.g$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02gov_09d4 <- with (base.g[base.g$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_09d5 <- with (base.g[base.g$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02gov_09d6 <- with (base.g[base.g$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## PJ

# all provinces
summary ((m02pj_09a1 <- with (base.p, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_09a2 <- with (base.p, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_09a3 <- with (base.p, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_09a4 <- with (base.p, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_09a5 <- with (base.p, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_09a6 <- with (base.p, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

# small provinces only
summary ((m02pj_09d1 <- with (base.p[base.p$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_09d2 <- with (base.p[base.p$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_09d3 <- with (base.p[base.p$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02pj_09d4 <- with (base.p[base.p$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_09d5 <- with (base.p[base.p$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02pj_09d6 <- with (base.p[base.p$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## UCR

# all provinces
summary ((m02ucr_09a1 <- with (base.r, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_09a2 <- with (base.r, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_09a3 <- with (base.r, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_09a4 <- with (base.r, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_09a5 <- with (base.r, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_09a6 <- with (base.r, rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

# small provinces only
summary ((m02ucr_09d1 <- with (base.r[base.r$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_09d2 <- with (base.r[base.r$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_09d3 <- with (base.r[base.r$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=NULL, level=95, p=1, q=2))))
summary ((m02ucr_09d4 <- with (base.r[base.r$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_09d5 <- with (base.r[base.r$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag, cluster=district, level=95, p=1, q=2))))
summary ((m02ucr_09d6 <- with (base.r[base.r$largeProv==0,], rdrobust (y=betterAfter2, x=running, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))



### Models reported in Table A18 (alternative RV)

# correlation between running and running_RT
with (base.g, cor (running, running_RT))  ## 0.93
with (base.p, cor (running, running_RT))  ## 0.93
with (base.r, cor (running, running_RT))  ## 0.93

with (base.g_RT, cor (running, running_RT))  ## 0.93
with (base.p_RT, cor (running, running_RT))  ## 0.93
with (base.r_RT, cor (running, running_RT))  ## 0.97

base.g$id <- with (base.g, factor (paste (election, name, sep="_")))
base.p$id <- with (base.p, factor (paste (election, name, sep="_")))
base.r$id <- with (base.r, factor (paste (election, name, sep="_")))
base.g_RT$id <- with (base.g_RT, factor (paste (election, name, sep="_")))
base.p_RT$id <- with (base.p_RT, factor (paste (election, name, sep="_")))
base.r_RT$id <- with (base.r_RT, factor (paste (election, name, sep="_")))

summary (base.g$id %in% base.g_RT$id); summary (base.g_RT$id %in% base.g$id)  ## 57/265 = 21.5% and 8/216 = 3.7% discrepancies
summary (base.p$id %in% base.p_RT$id); summary (base.p_RT$id %in% base.p$id)  ## 58/285 = 20.4% and 7/234 = 3.0% discrepancies
summary (base.r$id %in% base.r_RT$id); summary (base.r_RT$id %in% base.r$id)  ## (28/237 = 11.8% and 10/219 = 4.6% discrepancies


## Renomination at either t+2 or t+4

## governor's party
summary ((m05gov_01a1 <- with (base.g_RT, rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05gov_01a2 <- with (base.g_RT, rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05gov_01a3 <- with (base.g_RT, rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05gov_01a4 <- with (base.g_RT, rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05gov_01d1 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05gov_01d2 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05gov_01d3 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05gov_01d4 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

## PJ
summary ((m05pj_01a1 <- with (base.p_RT, rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05pj_01a2 <- with (base.p_RT, rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05pj_01a3 <- with (base.p_RT, rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05pj_01a4 <- with (base.p_RT, rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05pj_01d1 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05pj_01d2 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05pj_01d3 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05pj_01d4 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m05ucr_01a1 <- with (base.r_RT, rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05ucr_01a2 <- with (base.r_RT, rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05ucr_01a3 <- with (base.r_RT, rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05ucr_01a4 <- with (base.r_RT, rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05ucr_01d1 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05ucr_01d2 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05ucr_01d3 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05ucr_01d4 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=renom, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## Served as legislator at any moment afterwards (1) or not (0)

## governor's party
summary ((m05gov_02a1 <- with (base.g_RT, rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05gov_02a2 <- with (base.g_RT, rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05gov_02a3 <- with (base.g_RT, rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05gov_02a4 <- with (base.g_RT, rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05gov_02d1 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05gov_02d2 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05gov_02d3 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05gov_02d4 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

## PJ
summary ((m05pj_02a1 <- with (base.p_RT, rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05pj_02a2 <- with (base.p_RT, rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05pj_02a3 <- with (base.p_RT, rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05pj_02a4 <- with (base.p_RT, rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05pj_02d1 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05pj_02d2 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05pj_02d3 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05pj_02d4 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m05ucr_02a1 <- with (base.r_RT, rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05ucr_02a2 <- with (base.r_RT, rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05ucr_02a3 <- with (base.r_RT, rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05ucr_02a4 <- with (base.r_RT, rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05ucr_02d1 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05ucr_02d2 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05ucr_02d3 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05ucr_02d4 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=legAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## Served as executive at any moment afterwards (1) or not (0)

## governor's party
summary ((m05gov_03a1 <- with (base.g_RT, rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05gov_03a2 <- with (base.g_RT, rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05gov_03a3 <- with (base.g_RT, rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05gov_03a4 <- with (base.g_RT, rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05gov_03d1 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05gov_03d2 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05gov_03d3 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05gov_03d4 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## PJ
summary ((m05pj_03a1 <- with (base.p_RT, rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05pj_03a2 <- with (base.p_RT, rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05pj_03a3 <- with (base.p_RT, rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05pj_03a4 <- with (base.p_RT, rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05pj_03d1 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05pj_03d2 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05pj_03d3 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05pj_03d4 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m05ucr_03a1 <- with (base.r_RT, rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05ucr_03a2 <- with (base.r_RT, rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05ucr_03a3 <- with (base.r_RT, rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05ucr_03a4 <- with (base.r_RT, rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05ucr_03d1 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05ucr_03d2 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05ucr_03d3 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05ucr_03d4 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=exeAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## Served as legislator or executive at any moment afterwards (1) or not (0)

## governor's party
summary ((m05gov_05a1 <- with (base.g_RT, rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05gov_05a2 <- with (base.g_RT, rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05gov_05a3 <- with (base.g_RT, rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05gov_05a4 <- with (base.g_RT, rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05gov_05d1 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05gov_05d2 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05gov_05d3 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05gov_05d4 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

## PJ
summary ((m05pj_05a1 <- with (base.p_RT, rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05pj_05a2 <- with (base.p_RT, rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05pj_05a3 <- with (base.p_RT, rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05pj_05a4 <- with (base.p_RT, rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05pj_05d1 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05pj_05d2 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05pj_05d3 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05pj_05d4 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m05ucr_05a1 <- with (base.r_RT, rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05ucr_05a2 <- with (base.r_RT, rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05ucr_05a3 <- with (base.r_RT, rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05ucr_05a4 <- with (base.r_RT, rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05ucr_05d1 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05ucr_05d2 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05ucr_05d3 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05ucr_05d4 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=anyAfter, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))


## Total periods served afterwards (unweighted), in any position

## governor's party
summary ((m05gov_06a1 <- with (base.g_RT, rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05gov_06a2 <- with (base.g_RT, rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05gov_06a3 <- with (base.g_RT, rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05gov_06a4 <- with (base.g_RT, rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05gov_06d1 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05gov_06d2 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05gov_06d3 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05gov_06d4 <- with (base.g_RT[base.g_RT$largeProv==0,], rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

## PJ
summary ((m05pj_06a1 <- with (base.p_RT, rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05pj_06a2 <- with (base.p_RT, rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05pj_06a3 <- with (base.p_RT, rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05pj_06a4 <- with (base.p_RT, rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05pj_06d1 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05pj_06d2 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05pj_06d3 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05pj_06d4 <- with (base.p_RT[base.p_RT$largeProv==0,], rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

## UCR
summary ((m05ucr_06a1 <- with (base.r_RT, rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05ucr_06a2 <- with (base.r_RT, rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05ucr_06a3 <- with (base.r_RT, rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05ucr_06a4 <- with (base.r_RT, rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))

summary ((m05ucr_06d1 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=NULL, level=95, p=1, q=2))))
summary ((m05ucr_06d2 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, level=95, p=1, q=2))))
summary ((m05ucr_06d3 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=NULL, cluster=district, level=95, p=1, q=2))))
summary ((m05ucr_06d4 <- with (base.r_RT[base.r_RT$largeProv==0,], rdrobust (y=valAfter.eq, x=running_RT, fuzzy=NULL, covs=female+anyBefore+midterm+equalMag+largeMag+position01+position02+position03+position04, cluster=district, level=95, p=1, q=2))))





#%%%%%%%%%%%%%%%#
#### Figures ####
#%%%%%%%%%%%%%%%#


### Figure 1

png ("Figure 1.png", w=plotWidth*2, h=plotWidth*3)
par (mfrow=c (5,3))

## renomination
# png ("figQSMVgov01.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVgov01 <- with (base.g
                     , rdplot (y=renom, x=running
                               , p=2, binselect="qsmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 0.6)
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label="renomination (0/1)"
                               , x.label="")))
# dev.off ()
# png ("figQSMVpj01.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVpj01 <- with (base.p
                    , rdplot (y=renom, x=running
                              , p=2, binselect="qsmv", scale=1
                              , kernel="uniform"
                              , x.lim=c (-25, 25)
                              , y.lim=c (0, 0.6)
                              , yaxt="n"
                              , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                              , col.dots=cdot, col.lines=cline
                              , title=""
                              , y.label=""
                              , x.label="")))
# dev.off ()
# png ("figQSMVucr01.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVucr01 <- with (base.r
                     , rdplot (y=renom, x=running
                               , p=2, binselect="qsmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 0.6)
                               , yaxt="n"
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label=""
                               , x.label="")))
# dev.off ()

## legislator (after)
# png ("figQSMVgov02.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVgov02 <- with (base.g
                     , rdplot (y=legAfter, x=running
                               , p=2, binselect="qsmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 0.6)
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label="legislator (after) (0/1)"
                               , x.label="")))
# dev.off ()
# png ("figQSMVpj02.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVpj02 <- with (base.p
                    , rdplot (y=legAfter, x=running
                              , p=2, binselect="qsmv", scale=1
                              , kernel="uniform"
                              , x.lim=c (-25, 25)
                              , y.lim=c (0, 0.6)
                              , yaxt="n"
                              , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                              , col.dots=cdot, col.lines=cline
                              , title=""
                              , y.label=""
                              , x.label="")))
# dev.off ()
# png ("figQSMVucr02.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVucr02 <- with (base.r
                     , rdplot (y=legAfter, x=running
                               , p=2, binselect="qsmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 0.6)
                               , yaxt="n"
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label=""
                               , x.label="")))
# dev.off ()

## executive (after)
# png ("figQSMVgov03.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVgov03 <- with (base.g
                     , rdplot (y=exeAfter, x=running
                               , p=2, binselect="qsmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 0.325)
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label="executive (after) (0/1)"
                               , x.label="")))
# dev.off ()
# png ("figQSMVpj03.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVpj03 <- with (base.p
                    , rdplot (y=exeAfter, x=running
                              , p=2, binselect="qsmv", scale=1
                              , kernel="uniform"
                              , x.lim=c (-25, 25)
                              , y.lim=c (0, 0.325)
                              , yaxt="n"
                              , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                              , col.dots=cdot, col.lines=cline
                              , title=""
                              , y.label=""
                              , x.label="")))
# dev.off ()
# png ("figQSMVucr03.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVucr03 <- with (base.r
                     , rdplot (y=exeAfter, x=running
                               , p=2, binselect="qsmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 0.325)
                               , yaxt="n"
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label=""
                               , x.label="")))
# dev.off ()

## any office (after)
# png ("figQSMVgov04.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVgov04 <- with (base.g
                     , rdplot (y=anyAfter, x=running
                               , p=2, binselect="qsmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 0.8)
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label="any office (after) (0/1)"
                               , x.label="")))
# dev.off ()
# png ("figQSMVpj04.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVpj04 <- with (base.p
                    , rdplot (y=anyAfter, x=running
                              , p=2, binselect="qsmv", scale=1
                              , kernel="uniform"
                              , x.lim=c (-25, 25)
                              , y.lim=c (0, 0.8)
                              , yaxt="n"
                              , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                              , col.dots=cdot, col.lines=cline
                              , title=""
                              , y.label=""
                              , x.label="")))
# dev.off ()
# png ("figQSMVucr04.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVucr04 <- with (base.r
                     , rdplot (y=anyAfter, x=running
                               , p=2, binselect="qsmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 0.8)
                               , yaxt="n"
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label=""
                               , x.label="")))
# dev.off ()

## terms served (after)
# png ("figQSMVgov05.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVgov05 <- with (base.g
                     , rdplot (y=valAfter.eq, x=running
                               , p=2, binselect="qsmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 1.55)
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label="terms served (after)"
                               , x.label="")))
# dev.off ()
# png ("figQSMVpj05.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVpj05 <- with (base.p
                    , rdplot (y=valAfter.eq, x=running
                              , p=2, binselect="qsmv", scale=1
                              , kernel="uniform"
                              , x.lim=c (-25, 25)
                              , y.lim=c (0, 1.55)
                              , yaxt="n"
                              , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                              , col.dots=cdot, col.lines=cline
                              , title=""
                              , y.label=""
                              , x.label="")))
# dev.off ()
# png ("figQSMVucr05.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVucr05 <- with (base.r
                     , rdplot (y=valAfter.eq, x=running
                               , p=2, binselect="qsmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 1.55)
                               , yaxt="n"
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label=""
                               , x.label="")))
# dev.off ()

dev.off ()


### Figure 2

png ("Figure 2.png", w=plotWidth*2, h=plotWidth*3)
par (mfrow=c (5,3))

## renomination
# png ("figQSMVgov01sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVgov01sm <- with (base.g[base.g$largeProv==0,]
                       , rdplot (y=renom, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.65)
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label="renomination (0/1)"
                                 , x.label="")))
# dev.off ()
# png ("figQSMVpj01sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVpj01sm <- with (base.p[base.p$largeProv==0,]
                      , rdplot (y=renom, x=running
                                , p=2, binselect="qsmv", scale=1
                                , kernel="uniform"
                                , x.lim=c (-25, 25)
                                , y.lim=c (0, 0.65)
                                , yaxt="n"
                                , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                , col.dots=cdot, col.lines=cline
                                , title=""
                                , y.label=""
                                , x.label="")))
# dev.off ()
# png ("figQSMVucr01sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVucr01sm <- with (base.r[base.r$largeProv==0,]
                       , rdplot (y=renom, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.65)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()

## legislator (after)
# png ("figQSMVgov02sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVgov02sm <- with (base.g[base.g$largeProv==0,]
                       , rdplot (y=legAfter, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.6)
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label="legislator (after) (0/1)"
                                 , x.label="")))
# dev.off ()
# png ("figQSMVpj02sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVpj02sm <- with (base.p[base.p$largeProv==0,]
                      , rdplot (y=legAfter, x=running
                                , p=2, binselect="qsmv", scale=1
                                , kernel="uniform"
                                , x.lim=c (-25, 25)
                                , y.lim=c (0, 0.6)
                                , yaxt="n"
                                , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                , col.dots=cdot, col.lines=cline
                                , title=""
                                , y.label=""
                                , x.label="")))
# dev.off ()
# png ("figQSMVucr02sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVucr02sm <- with (base.r[base.r$largeProv==0,]
                       , rdplot (y=legAfter, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.6)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()

## executive (after)
# png ("figQSMVgov03sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVgov03sm <- with (base.g[base.g$largeProv==0,]
                       , rdplot (y=exeAfter, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.325)
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label="executive (after) (0/1)"
                                 , x.label="")))
# dev.off ()
# png ("figQSMVpj03sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVpj03sm <- with (base.p[base.p$largeProv==0,]
                      , rdplot (y=exeAfter, x=running
                                , p=2, binselect="qsmv", scale=1
                                , kernel="uniform"
                                , x.lim=c (-25, 25)
                                , y.lim=c (0, 0.325)
                                , yaxt="n"
                                , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                , col.dots=cdot, col.lines=cline
                                , title=""
                                , y.label=""
                                , x.label="")))
# dev.off ()
# png ("figQSMVucr03sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVucr03sm <- with (base.r[base.r$largeProv==0,]
                       , rdplot (y=exeAfter, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.325)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()

## any office (after)
# png ("figQSMVgov04sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVgov04sm <- with (base.g[base.g$largeProv==0,]
                       , rdplot (y=anyAfter, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.8)
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label="any office (after) (0/1)"
                                 , x.label="")))
# dev.off ()
# png ("figQSMVpj04sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVpj04sm <- with (base.p[base.p$largeProv==0,]
                      , rdplot (y=anyAfter, x=running
                                , p=2, binselect="qsmv", scale=1
                                , kernel="uniform"
                                , x.lim=c (-25, 25)
                                , y.lim=c (0, 0.8)
                                , yaxt="n"
                                , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                , col.dots=cdot, col.lines=cline
                                , title=""
                                , y.label=""
                                , x.label="")))
# dev.off ()
# png ("figQSMVucr04sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVucr04sm <- with (base.r[base.r$largeProv==0,]
                       , rdplot (y=anyAfter, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.8)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()

## terms served (after)
# png ("figQSMVgov05sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVgov05sm <- with (base.g[base.g$largeProv==0,]
                       , rdplot (y=valAfter.eq, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 1.55)
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label="terms served (after)"
                                 , x.label="")))
# dev.off ()
# png ("figQSMVpj05sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVpj05sm <- with (base.p[base.p$largeProv==0,]
                      , rdplot (y=valAfter.eq, x=running
                                , p=2, binselect="qsmv", scale=1
                                , kernel="uniform"
                                , x.lim=c (-25, 25)
                                , y.lim=c (0, 1.55)
                                , yaxt="n"
                                , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                , col.dots=cdot, col.lines=cline
                                , title=""
                                , y.label=""
                                , x.label="")))
# dev.off ()
# png ("figQSMVucr05sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pQSMVucr05sm <- with (base.r[base.r$largeProv==0,]
                       , rdplot (y=valAfter.eq, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 1.55)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()

dev.off ()


### Figure A1

png ("Figure A1.png", w=plotWidth*2, h=plotWidth*3)
par (mfrow=c (5,3))

## renomination
# png ("figESMVgov01.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVgov01 <- with (base.g
                     , rdplot (y=renom, x=running
                               , p=2, binselect="esmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 1)
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label="renomination (0/1)"
                               , x.label="")))
# dev.off ()
# png ("figESMVpj01.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVpj01 <- with (base.p
                    , rdplot (y=renom, x=running
                              , p=2, binselect="esmv", scale=1
                              , kernel="uniform"
                              , x.lim=c (-25, 25)
                              , y.lim=c (0, 1)
                              , yaxt="n"
                              , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                              , col.dots=cdot, col.lines=cline
                              , title=""
                              , y.label=""
                              , x.label="")))
# dev.off ()
# png ("figESMVucr01.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVucr01 <- with (base.r
                     , rdplot (y=renom, x=running
                               , p=2, binselect="esmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 1)
                               , yaxt="n"
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label=""
                               , x.label="")))
# dev.off ()

## legislator (after)
# png ("figESMVgov02.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVgov02 <- with (base.g
                     , rdplot (y=legAfter, x=running
                               , p=2, binselect="esmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 1)
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label="legislator (after) (0/1)"
                               , x.label="")))
# dev.off ()
# png ("figESMVpj02.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVpj02 <- with (base.p
                    , rdplot (y=legAfter, x=running
                              , p=2, binselect="esmv", scale=1
                              , kernel="uniform"
                              , x.lim=c (-25, 25)
                              , y.lim=c (0, 1)
                              , yaxt="n"
                              , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                              , col.dots=cdot, col.lines=cline
                              , title=""
                              , y.label=""
                              , x.label="")))
# dev.off ()
# png ("figESMVucr02.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVucr02 <- with (base.r
                     , rdplot (y=legAfter, x=running
                               , p=2, binselect="esmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 1)
                               , yaxt="n"
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label=""
                               , x.label="")))
# dev.off ()

## executive (after)
# png ("figESMVgov03.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVgov03 <- with (base.g
                     , rdplot (y=exeAfter, x=running
                               , p=2, binselect="esmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 0.5)
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label="executive (after) (0/1)"
                               , x.label="")))
# dev.off ()
# png ("figESMVpj03.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVpj03 <- with (base.p
                    , rdplot (y=exeAfter, x=running
                              , p=2, binselect="esmv", scale=1
                              , kernel="uniform"
                              , x.lim=c (-25, 25)
                              , y.lim=c (0, 0.5)
                              , yaxt="n"
                              , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                              , col.dots=cdot, col.lines=cline
                              , title=""
                              , y.label=""
                              , x.label="")))
# dev.off ()
# png ("figESMVucr03.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVucr03 <- with (base.r
                     , rdplot (y=exeAfter, x=running
                               , p=2, binselect="esmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 0.5)
                               , yaxt="n"
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label=""
                               , x.label="")))
# dev.off ()

## any office (after)
# png ("figESMVgov04.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVgov04 <- with (base.g
                     , rdplot (y=anyAfter, x=running
                               , p=2, binselect="esmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 1)
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label="any office (after) (0/1)"
                               , x.label="")))
# dev.off ()
# png ("figESMVpj04.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVpj04 <- with (base.p
                    , rdplot (y=anyAfter, x=running
                              , p=2, binselect="esmv", scale=1
                              , kernel="uniform"
                              , x.lim=c (-25, 25)
                              , y.lim=c (0, 1)
                              , yaxt="n"
                              , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                              , col.dots=cdot, col.lines=cline
                              , title=""
                              , y.label=""
                              , x.label="")))
# dev.off ()
# png ("figESMVucr04.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVucr04 <- with (base.r
                     , rdplot (y=anyAfter, x=running
                               , p=2, binselect="esmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 1)
                               , yaxt="n"
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label=""
                               , x.label="")))
# dev.off ()

## terms served (after)
# png ("figESMVgov05.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVgov05 <- with (base.g
                     , rdplot (y=valAfter.eq, x=running
                               , p=2, binselect="esmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 1.8)
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label="terms served (after)"
                               , x.label="")))
# dev.off ()
# png ("figESMVpj05.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVpj05 <- with (base.p
                    , rdplot (y=valAfter.eq, x=running
                              , p=2, binselect="esmv", scale=1
                              , kernel="uniform"
                              , x.lim=c (-25, 25)
                              , y.lim=c (0, 1.8)
                              , yaxt="n"
                              , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                              , col.dots=cdot, col.lines=cline
                              , title=""
                              , y.label=""
                              , x.label="")))
# dev.off ()
# png ("figESMVucr05.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVucr05 <- with (base.r
                     , rdplot (y=valAfter.eq, x=running
                               , p=2, binselect="esmv", scale=1
                               , kernel="uniform"
                               , x.lim=c (-25, 25)
                               , y.lim=c (0, 1.8)
                               , yaxt="n"
                               , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                               , col.dots=cdot, col.lines=cline
                               , title=""
                               , y.label=""
                               , x.label="")))
# dev.off ()

dev.off ()


### Figure A2

png ("Figure A2.png", w=plotWidth*2, h=plotWidth*3)
par (mfrow=c (5,3))

## renomination
# png ("figESMVgov01sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVgov01sm <- with (base.g[base.g$largeProv==0,]
                       , rdplot (y=renom, x=running
                                 , p=2, binselect="esmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.6)
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label="renomination (0/1)"
                                 , x.label="")))
# dev.off ()
# png ("figESMVpj01sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVpj01sm <- with (base.p[base.p$largeProv==0,]
                      , rdplot (y=renom, x=running
                                , p=2, binselect="esmv", scale=1
                                , kernel="uniform"
                                , x.lim=c (-25, 25)
                                , y.lim=c (0, 0.6)
                                , yaxt="n"
                                , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                , col.dots=cdot, col.lines=cline
                                , title=""
                                , y.label=""
                                , x.label="")))
# dev.off ()
# png ("figESMVucr01sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVucr01sm <- with (base.r[base.r$largeProv==0,]
                       , rdplot (y=renom, x=running
                                 , p=2, binselect="esmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.6)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()

## legislator (after)
# png ("figESMVgov02sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVgov02sm <- with (base.g[base.g$largeProv==0,]
                       , rdplot (y=legAfter, x=running
                                 , p=2, binselect="esmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 1)
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label="legislator (after) (0/1)"
                                 , x.label="")))
# dev.off ()
# png ("figESMVpj02sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVpj02sm <- with (base.p[base.p$largeProv==0,]
                      , rdplot (y=legAfter, x=running
                                , p=2, binselect="esmv", scale=1
                                , kernel="uniform"
                                , x.lim=c (-25, 25)
                                , y.lim=c (0, 1)
                                , yaxt="n"
                                , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                , col.dots=cdot, col.lines=cline
                                , title=""
                                , y.label=""
                                , x.label="")))
# dev.off ()
# png ("figESMVucr02sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVucr02sm <- with (base.r[base.r$largeProv==0,]
                       , rdplot (y=legAfter, x=running
                                 , p=2, binselect="esmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 1)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()

## executive (after)
# png ("figESMVgov03sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVgov03sm <- with (base.g[base.g$largeProv==0,]
                       , rdplot (y=exeAfter, x=running
                                 , p=2, binselect="esmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.4)
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label="executive (after) (0/1)"
                                 , x.label="")))
# dev.off ()
# png ("figESMVpj03sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVpj03sm <- with (base.p[base.p$largeProv==0,]
                      , rdplot (y=exeAfter, x=running
                                , p=2, binselect="esmv", scale=1
                                , kernel="uniform"
                                , x.lim=c (-25, 25)
                                , y.lim=c (0, 0.4)
                                , yaxt="n"
                                , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                , col.dots=cdot, col.lines=cline
                                , title=""
                                , y.label=""
                                , x.label="")))
# dev.off ()
# png ("figESMVucr03sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVucr03sm <- with (base.r[base.r$largeProv==0,]
                       , rdplot (y=exeAfter, x=running
                                 , p=2, binselect="esmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.4)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()

## any office (after)
# png ("figESMVgov04sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVgov04sm <- with (base.g[base.g$largeProv==0,]
                       , rdplot (y=anyAfter, x=running
                                 , p=2, binselect="esmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 1)
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label="any office (after) (0/1)"
                                 , x.label="")))
# dev.off ()
# png ("figESMVpj04sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVpj04sm <- with (base.p[base.p$largeProv==0,]
                      , rdplot (y=anyAfter, x=running
                                , p=2, binselect="esmv", scale=1
                                , kernel="uniform"
                                , x.lim=c (-25, 25)
                                , y.lim=c (0, 1)
                                , yaxt="n"
                                , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                , col.dots=cdot, col.lines=cline
                                , title=""
                                , y.label=""
                                , x.label="")))
# dev.off ()
# png ("figESMVucr04sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVucr04sm <- with (base.r[base.r$largeProv==0,]
                       , rdplot (y=anyAfter, x=running
                                 , p=2, binselect="esmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 1)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()

## terms served (after)
# png ("figESMVgov05sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVgov05sm <- with (base.g[base.g$largeProv==0,]
                       , rdplot (y=valAfter.eq, x=running
                                 , p=2, binselect="esmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 2)
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label="terms served (after)"
                                 , x.label="")))
# dev.off ()
# png ("figESMVpj05sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVpj05sm <- with (base.p[base.p$largeProv==0,]
                      , rdplot (y=valAfter.eq, x=running
                                , p=2, binselect="esmv", scale=1
                                , kernel="uniform"
                                , x.lim=c (-25, 25)
                                , y.lim=c (0, 2)
                                , yaxt="n"
                                , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                , col.dots=cdot, col.lines=cline
                                , title=""
                                , y.label=""
                                , x.label="")))
# dev.off ()
# png ("figESMVucr05sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pESMVucr05sm <- with (base.r[base.r$largeProv==0,]
                       , rdplot (y=valAfter.eq, x=running
                                 , p=2, binselect="esmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 2)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()

dev.off ()


### Figure A7 (compliance)

png ("Figure A7.png", w=plotWidth*3, h=plotWidth*3)
par (mfrow=c (4,3))

## Probability of assuming office / serving as deputy

# all provinces
# png ("figCompQSMVgov01.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pCompQSMVgov01 <- with (base.g
                         , rdplot (y=assumed, x=running
                                   , p=2, binselect="qsmv", scale=1
                                   , kernel="uniform"
                                   , x.lim=c (-25, 25)
                                   , y.lim=c (0, 1)
                                   , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                   , col.dots=cdot, col.lines=cline
                                   , title=""
                                   , y.label="assumed office (0/1)"
                                   , x.label="")))
# dev.off ()
# png ("figCompQSMVpj01.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pCompQSMVpj01 <- with (base.p
                        , rdplot (y=assumed, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 1)
                                  , yaxt="n"
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label=""
                                  , x.label="")))
# dev.off ()
# png ("figCompQSMVucr01.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pCompQSMVucr01 <- with (base.r
                         , rdplot (y=assumed, x=running
                                   , p=2, binselect="qsmv", scale=1
                                   , kernel="uniform"
                                   , x.lim=c (-25, 25)
                                   , y.lim=c (0, 1)
                                   , yaxt="n"
                                   , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                   , col.dots=cdot, col.lines=cline
                                   , title=""
                                   , y.label=""
                                   , x.label="")))
# dev.off ()

# small provinces (M <= 5) only
# png ("figCompQSMVgov01sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pCompQSMVgov01sm <- with (base.g[base.g$largeProv==0,]
                           , rdplot (y=assumed, x=running
                                     , p=2, binselect="qsmv", scale=1
                                     , kernel="uniform"
                                     , x.lim=c (-25, 25)
                                     , y.lim=c (0, 1)
                                     , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                     , col.dots=cdot, col.lines=cline
                                     , title=""
                                     , y.label="assumed office (0/1)"
                                     , x.label="")))
# dev.off ()
# png ("figCompQSMVpj01sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pCompQSMVpj01sm <- with (base.p[base.p$largeProv==0,]
                          , rdplot (y=assumed, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 1)
                                    , yaxt="n"
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label=""
                                    , x.label="")))
# dev.off ()
# png ("figCompQSMVucr01sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pCompQSMVucr01sm <- with (base.r[base.r$largeProv==0,]
                           , rdplot (y=assumed, x=running
                                     , p=2, binselect="qsmv", scale=1
                                     , kernel="uniform"
                                     , x.lim=c (-25, 25)
                                     , y.lim=c (0, 1)
                                     , yaxt="n"
                                     , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                     , col.dots=cdot, col.lines=cline
                                     , title=""
                                     , y.label=""
                                     , x.label="")))
# dev.off ()


## Proportion of mandate effectively served

# all provinces
# png ("figCompQSMVgov02.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pCompQSMVgov02 <- with (base.g
                         , rdplot (y=pWeight, x=running
                                   , p=2, binselect="qsmv", scale=1
                                   , kernel="uniform"
                                   , x.lim=c (-25, 25)
                                   , y.lim=c (0, 1)
                                   , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                   , col.dots=cdot, col.lines=cline
                                   , title=""
                                   , y.label="prop. term served"
                                   , x.label="")))
# dev.off ()
# png ("figCompQSMVpj02.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pCompQSMVpj02 <- with (base.p
                        , rdplot (y=pWeight, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 1)
                                  , yaxt="n"
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label=""
                                  , x.label="")))
# dev.off ()
# png ("figCompQSMVucr02.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pCompQSMVucr02 <- with (base.r
                         , rdplot (y=pWeight, x=running
                                   , p=2, binselect="qsmv", scale=1
                                   , kernel="uniform"
                                   , x.lim=c (-25, 25)
                                   , y.lim=c (0, 1)
                                   , yaxt="n"
                                   , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                   , col.dots=cdot, col.lines=cline
                                   , title=""
                                   , y.label=""
                                   , x.label="")))
# dev.off ()

# small provinces (M <= 5) only
# png ("figCompQSMVgov02sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pCompQSMVgov02sm <- with (base.g[base.g$largeProv==0,]
                           , rdplot (y=pWeight, x=running
                                     , p=2, binselect="qsmv", scale=1
                                     , kernel="uniform"
                                     , x.lim=c (-25, 25)
                                     , y.lim=c (0, 1)
                                     , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                     , col.dots=cdot, col.lines=cline
                                     , title=""
                                     , y.label="prop. term served"
                                     , x.label="")))
# dev.off ()
# png ("figCompQSMVpj02sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pCompQSMVpj02sm <- with (base.p[base.p$largeProv==0,]
                          , rdplot (y=pWeight, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 1)
                                    , yaxt="n"
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label=""
                                    , x.label="")))
# dev.off ()
# png ("figCompQSMVucr02sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pCompQSMVucr02sm <- with (base.r[base.r$largeProv==0,]
                           , rdplot (y=pWeight, x=running
                                     , p=2, binselect="qsmv", scale=1
                                     , kernel="uniform"
                                     , x.lim=c (-25, 25)
                                     , y.lim=c (0, 1)
                                     , yaxt="n"
                                     , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                     , col.dots=cdot, col.lines=cline
                                     , title=""
                                     , y.label=""
                                     , x.label="")))
# dev.off ()

dev.off ()


### Figure A8 (density tests)

## All provinces

# governor's party
# png ("figDensityGov01.png", w=plotWidth*0.725, h=plotWidth*0.95/aspect.ratio)
densityGov01 <- rddensity (base.g$running)
(pDensityGov01 <- rdplotdensity (densityGov01
                                 , base.g$running
                                 , type="both"
                                 , xlabel="vote change to last seat"))
# dev.off ()

# PJ
# png ("figDensityPJ01.png", w=plotWidth*0.725, h=plotWidth*0.95/aspect.ratio)
densityPJ01 <- rddensity (base.p$running)
(pDensityPJ01 <- rdplotdensity (densityPJ01
                                , base.p$running
                                , type="both"
                                , xlabel="vote change to last seat"))
# dev.off ()

# UCR
# png ("figDensityUCR01.png", w=plotWidth*0.725, h=plotWidth*0.95/aspect.ratio)
densityUCR01 <- rddensity (base.r$running)
(pDensityUCR01 <- rdplotdensity (densityUCR01
                                 , base.r$running
                                 , type="both"
                                 , xlabel="vote change to last seat"))
# dev.off ()


## Small provinces only

# governor's party
# png ("figDensityGov01sm.png", w=plotWidth*0.725, h=plotWidth*0.95/aspect.ratio)
densityGov01sm <- rddensity (base.g[base.g$largeProv==0,]$running)
(pDensityGov01sm <- rdplotdensity (densityGov01sm
                                   , base.g[base.g$largeProv==0,]$running
                                   , type="both"
                                   , xlabel="vote change to last seat"))
# dev.off ()

# PJ
# png ("figDensityPJ01sm.png", w=plotWidth*0.725, h=plotWidth*0.95/aspect.ratio)
densityPJ01sm <- rddensity (base.p[base.p$largeProv==0,]$running)
(pDensityPJ01sm <- rdplotdensity (densityPJ01sm
                                  , base.p[base.p$largeProv==0,]$running
                                  , type="both"
                                  , xlabel="vote change to last seat"))
# dev.off ()

# UCR
# png ("figDensityUCR01sm.png", w=plotWidth*0.725, h=plotWidth*0.95/aspect.ratio)
densityUCR01sm <- rddensity (base.r[base.r$largeProv==0,]$running)
(pDensityUCR01sm <- rdplotdensity (densityUCR01sm
                                   , base.r[base.r$largeProv==0,]$running
                                   , type="both"
                                   , xlabel="vote change to last seat"))
# dev.off ()

## exporting as Figure A8
png ("Figure A8.png", w=plotWidth*1.5, h=plotWidth*1)
grid.arrange (pDensityGov01$Estplot, pDensityPJ01$Estplot, pDensityUCR01$Estplot
              , pDensityGov01sm$Estplot, pDensityPJ01sm$Estplot, pDensityUCR01sm$Estplot
              , nrow=2)
dev.off ()

## getting the p-values
round (densityGov01$test$p_jk, 2) ## 0.40
round (densityPJ01$test$p_jk, 2) ## 0.45
round (densityUCR01$test$p_jk, 2) ## 0.73
round (densityGov01sm$test$p_jk, 2) ## 0.61
round (densityPJ01sm$test$p_jk, 2) ## 0.92
round (densityUCR01sm$test$p_jk, 2) ## 0.81


### Figures A9-A10

png ("Figure A9.png", w=plotWidth*2, h=plotWidth*3)
par (mfrow=c (5,3))

## position in list
# png ("figBalQSMVgov01.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov01 <- with (base.g
                        , rdplot (y=position, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (1, 14)
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label="position in party list"
                                  , x.label="")))
# dev.off ()
# png ("figBalQSMVpj01.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj01 <- with (base.p
                       , rdplot (y=position, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (1, 14)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()
# png ("figBalQSMVucr01.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr01 <- with (base.r
                        , rdplot (y=position, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (1, 14)
                                  , yaxt="n"
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label=""
                                  , x.label="")))
# dev.off ()

## legislator (before)
# png ("figBalQSMVgov02.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov02 <- with (base.g
                        , rdplot (y=legBefore, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 0.6)
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label="legislator (before) (0/1)"
                                  , x.label="")))
# dev.off ()
# png ("figBalQSMVpj02.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj02 <- with (base.p
                       , rdplot (y=legBefore, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.6)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()
# png ("figBalQSMVucr02.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr02 <- with (base.r
                        , rdplot (y=legBefore, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 0.6)
                                  , yaxt="n"
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label=""
                                  , x.label="")))
# dev.off ()

## executive (before)
# png ("figBalQSMVgov03.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov03 <- with (base.g
                        , rdplot (y=exeBefore, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 0.3)
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label="executive (before) (0/1)"
                                  , x.label="")))
# dev.off ()
# png ("figBalQSMVpj03.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj03 <- with (base.p
                       , rdplot (y=exeBefore, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.3)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()
# png ("figBalQSMVucr03.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr03 <- with (base.r
                        , rdplot (y=exeBefore, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 0.3)
                                  , yaxt="n"
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label=""
                                  , x.label="")))
# dev.off ()

## any office (before)
# png ("figBalQSMVgov04.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov04 <- with (base.g
                        , rdplot (y=anyBefore, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 0.6)
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label="any office (before) (0/1)"
                                  , x.label="")))
# dev.off ()
# png ("figBalQSMVpj04.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj04 <- with (base.p
                       , rdplot (y=anyBefore, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.6)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()
# png ("figBalQSMVucr04.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr04 <- with (base.r
                        , rdplot (y=anyBefore, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 0.6)
                                  , yaxt="n"
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label=""
                                  , x.label="")))
# dev.off ()

## terms served (before)
# png ("figBalQSMVgov05.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov05 <- with (base.g
                        , rdplot (y=valAfter.eq, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 1.6)
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label="terms served (before)"
                                  , x.label="")))
# dev.off ()
# png ("figBalQSMVpj05.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj05 <- with (base.p
                       , rdplot (y=valAfter.eq, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 1.6)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()
# png ("figBalQSMVucr05.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr05 <- with (base.r
                        , rdplot (y=valAfter.eq, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 1.6)
                                  , yaxt="n"
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label=""
                                  , x.label="")))
# dev.off ()

dev.off ()


png ("Figure A10.png", w=plotWidth*2, h=plotWidth*3)
par (mfrow=c (5,3))

## female (0/1)
# png ("figBalQSMVgov06.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov06 <- with (base.g
                        , rdplot (y=female, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 0.8)
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label="female (0/1)"
                                  , x.label="")))
# dev.off ()
# png ("figBalQSMVpj06.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj06 <- with (base.p
                       , rdplot (y=female, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.8)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()
# png ("figBalQSMVucr06.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr06 <- with (base.r
                        , rdplot (y=female, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 0.8)
                                  , yaxt="n"
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label=""
                                  , x.label="")))
# dev.off ()

## president's party (0/1)
# png ("figBalQSMVgov07.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov07 <- with (base.g
                        , rdplot (y=incPresi, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 1)
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label="president's party (0/1)"
                                  , x.label="")))
# dev.off ()
# png ("figBalQSMVpj07.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj07 <- with (base.p
                       , rdplot (y=incPresi, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 1)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()
# png ("figBalQSMVucr07.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr07 <- with (base.r
                        , rdplot (y=incPresi, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 1)
                                  , yaxt="n"
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label=""
                                  , x.label="")))
# dev.off ()

## midterm election (0/1)
# png ("figBalQSMVgov08.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov08 <- with (base.g
                        , rdplot (y=midterm, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 1)
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label="midterm (0/1)"
                                  , x.label="")))
# dev.off ()
# png ("figBalQSMVpj08.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj08 <- with (base.p
                       , rdplot (y=midterm, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 1)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()
# png ("figBalQSMVucr08.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr08 <- with (base.r
                        , rdplot (y=midterm, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 1)
                                  , yaxt="n"
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label=""
                                  , x.label="")))
# dev.off ()

## district magnitude (log)
# png ("figBalQSMVgov09.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov09 <- with (base.g
                        , rdplot (y=log (mag), x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0.5, 2.5)
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label="district magnitude (log)"
                                  , x.label="")))
# dev.off ()
# png ("figBalQSMVpj09.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj09 <- with (base.p
                       , rdplot (y=log (mag), x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0.5, 2.5)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()
# png ("figBalQSMVucr09.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr09 <- with (base.r
                        , rdplot (y=log (mag), x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0.5, 2.5)
                                  , yaxt="n"
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label=""
                                  , x.label="")))
# dev.off ()

## large magnitude election (0/1)
# png ("figBalQSMVgov10.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov10 <- with (base.g
                        , rdplot (y=largeMag2, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 0.85)
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label="large magnitude (0/1)"
                                  , x.label="")))
# dev.off ()
# png ("figBalQSMVpj10.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj10 <- with (base.p
                       , rdplot (y=largeMag2, x=running
                                 , p=2, binselect="qsmv", scale=1
                                 , kernel="uniform"
                                 , x.lim=c (-25, 25)
                                 , y.lim=c (0, 0.85)
                                 , yaxt="n"
                                 , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                 , col.dots=cdot, col.lines=cline
                                 , title=""
                                 , y.label=""
                                 , x.label="")))
# dev.off ()
# png ("figBalQSMVucr10.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr10 <- with (base.r
                        , rdplot (y=largeMag2, x=running
                                  , p=2, binselect="qsmv", scale=1
                                  , kernel="uniform"
                                  , x.lim=c (-25, 25)
                                  , y.lim=c (0, 0.85)
                                  , yaxt="n"
                                  , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                  , col.dots=cdot, col.lines=cline
                                  , title=""
                                  , y.label=""
                                  , x.label="")))
# dev.off ()

dev.off ()


### Figures A11-A12

png ("Figure A11.png", w=plotWidth*2, h=plotWidth*3)
par (mfrow=c (5,3))

## position in list
# png ("figBalQSMVgov01sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov01sm <- with (base.g[base.g$largeProv==0,]
                          , rdplot (y=position, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (1, 3.2)
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label="position in party list"
                                    , x.label="")))
# dev.off ()
# png ("figBalQSMVpj01sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj01sm <- with (base.p[base.p$largeProv==0,]
                         , rdplot (y=position, x=running
                                   , p=2, binselect="qsmv", scale=1
                                   , kernel="uniform"
                                   , x.lim=c (-25, 25)
                                   , y.lim=c (1, 3.2)
                                   , yaxt="n"
                                   , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                   , col.dots=cdot, col.lines=cline
                                   , title=""
                                   , y.label=""
                                   , x.label="")))
# dev.off ()
# png ("figBalQSMVucr01sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr01sm <- with (base.r[base.r$largeProv==0,]
                          , rdplot (y=position, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (1, 3.2)
                                    , yaxt="n"
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label=""
                                    , x.label="")))
# dev.off ()

## legislator (before)
# png ("figBalQSMVgov02sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov02sm <- with (base.g[base.g$largeProv==0,]
                          , rdplot (y=legBefore, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 0.5)
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label="legislator (before) (0/1)"
                                    , x.label="")))
# dev.off ()
# png ("figBalQSMVpj02sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj02sm <- with (base.p[base.p$largeProv==0,]
                         , rdplot (y=legBefore, x=running
                                   , p=2, binselect="qsmv", scale=1
                                   , kernel="uniform"
                                   , x.lim=c (-25, 25)
                                   , y.lim=c (0, 0.5)
                                   , yaxt="n"
                                   , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                   , col.dots=cdot, col.lines=cline
                                   , title=""
                                   , y.label=""
                                   , x.label="")))
# dev.off ()
# png ("figBalQSMVucr02sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr02sm <- with (base.r[base.r$largeProv==0,]
                          , rdplot (y=legBefore, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 0.5)
                                    , yaxt="n"
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label=""
                                    , x.label="")))
# dev.off ()

## executive (before)
# png ("figBalQSMVgov03sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov03sm <- with (base.g[base.g$largeProv==0,]
                          , rdplot (y=exeBefore, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 0.3)
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label="executive (before) (0/1)"
                                    , x.label="")))
# dev.off ()
# png ("figBalQSMVpj03sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj03sm <- with (base.p[base.p$largeProv==0,]
                         , rdplot (y=exeBefore, x=running
                                   , p=2, binselect="qsmv", scale=1
                                   , kernel="uniform"
                                   , x.lim=c (-25, 25)
                                   , y.lim=c (0, 0.3)
                                   , yaxt="n"
                                   , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                   , col.dots=cdot, col.lines=cline
                                   , title=""
                                   , y.label=""
                                   , x.label="")))
# dev.off ()
# png ("figBalQSMVucr03sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr03sm <- with (base.r[base.r$largeProv==0,]
                          , rdplot (y=exeBefore, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 0.3)
                                    , yaxt="n"
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label=""
                                    , x.label="")))
# dev.off ()

## any office (before)
# png ("figBalQSMVgov04sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov04sm <- with (base.g[base.g$largeProv==0,]
                          , rdplot (y=anyBefore, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 0.6)
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label="any office (before) (0/1)"
                                    , x.label="")))
# dev.off ()
# png ("figBalQSMVpj04sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj04sm <- with (base.p[base.p$largeProv==0,]
                         , rdplot (y=anyBefore, x=running
                                   , p=2, binselect="qsmv", scale=1
                                   , kernel="uniform"
                                   , x.lim=c (-25, 25)
                                   , y.lim=c (0, 0.6)
                                   , yaxt="n"
                                   , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                   , col.dots=cdot, col.lines=cline
                                   , title=""
                                   , y.label=""
                                   , x.label="")))
# dev.off ()
# png ("figBalQSMVucr04sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr04sm <- with (base.r[base.r$largeProv==0,]
                          , rdplot (y=anyBefore, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 0.6)
                                    , yaxt="n"
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label=""
                                    , x.label="")))
# dev.off ()

## terms served (before)
# png ("figBalQSMVgov05sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov05sm <- with (base.g[base.g$largeProv==0,]
                          , rdplot (y=valAfter.eq, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 1.5)
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label="terms served (before)"
                                    , x.label="")))
# dev.off ()
# png ("figBalQSMVpj05sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj05sm <- with (base.p[base.p$largeProv==0,]
                         , rdplot (y=valAfter.eq, x=running
                                   , p=2, binselect="qsmv", scale=1
                                   , kernel="uniform"
                                   , x.lim=c (-25, 25)
                                   , y.lim=c (0, 1.5)
                                   , yaxt="n"
                                   , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                   , col.dots=cdot, col.lines=cline
                                   , title=""
                                   , y.label=""
                                   , x.label="")))
# dev.off ()
# png ("figBalQSMVucr05sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr05sm <- with (base.r[base.r$largeProv==0,]
                          , rdplot (y=valAfter.eq, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 1.5)
                                    , yaxt="n"
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label=""
                                    , x.label="")))
# dev.off ()

dev.off ()


png ("Figure A12.png", w=plotWidth*2, h=plotWidth*3)
par (mfrow=c (5,3))

## female (0/1)
# png ("figBalQSMVgov06sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov06sm <- with (base.g[base.g$largeProv==0,]
                          , rdplot (y=female, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 0.8)
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label="female (0/1)"
                                    , x.label="")))
# dev.off ()
# png ("figBalQSMVpj06sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj06sm <- with (base.p[base.p$largeProv==0,]
                         , rdplot (y=female, x=running
                                   , p=2, binselect="qsmv", scale=1
                                   , kernel="uniform"
                                   , x.lim=c (-25, 25)
                                   , y.lim=c (0, 0.8)
                                   , yaxt="n"
                                   , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                   , col.dots=cdot, col.lines=cline
                                   , title=""
                                   , y.label=""
                                   , x.label="")))
# dev.off ()
# png ("figBalQSMVucr06sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr06sm <- with (base.r[base.r$largeProv==0,]
                          , rdplot (y=female, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 0.8)
                                    , yaxt="n"
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label=""
                                    , x.label="")))
# dev.off ()

## president's party (0/1)
# png ("figBalQSMVgov07sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov07sm <- with (base.g[base.g$largeProv==0,]
                          , rdplot (y=incPresi, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 1)
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label="president's party (0/1)"
                                    , x.label="")))
# dev.off ()
# png ("figBalQSMVpj07sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj07sm <- with (base.p[base.p$largeProv==0,]
                         , rdplot (y=incPresi, x=running
                                   , p=2, binselect="qsmv", scale=1
                                   , kernel="uniform"
                                   , x.lim=c (-25, 25)
                                   , y.lim=c (0, 1)
                                   , yaxt="n"
                                   , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                   , col.dots=cdot, col.lines=cline
                                   , title=""
                                   , y.label=""
                                   , x.label="")))
# dev.off ()
# png ("figBalQSMVucr07sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr07sm <- with (base.r[base.r$largeProv==0,]
                          , rdplot (y=incPresi, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 1)
                                    , yaxt="n"
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label=""
                                    , x.label="")))
# dev.off ()

## midterm election (0/1)
# png ("figBalQSMVgov08sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov08sm <- with (base.g[base.g$largeProv==0,]
                          , rdplot (y=midterm, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 1)
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label="midterm (0/1)"
                                    , x.label="")))
# dev.off ()
# png ("figBalQSMVpj08sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj08sm <- with (base.p[base.p$largeProv==0,]
                         , rdplot (y=midterm, x=running
                                   , p=2, binselect="qsmv", scale=1
                                   , kernel="uniform"
                                   , x.lim=c (-25, 25)
                                   , y.lim=c (0, 1)
                                   , yaxt="n"
                                   , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                   , col.dots=cdot, col.lines=cline
                                   , title=""
                                   , y.label=""
                                   , x.label="")))
# dev.off ()
# png ("figBalQSMVucr08sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr08sm <- with (base.r[base.r$largeProv==0,]
                          , rdplot (y=midterm, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 1)
                                    , yaxt="n"
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label=""
                                    , x.label="")))
# dev.off ()

## district magnitude (log)
# png ("figBalQSMVgov09sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov09sm <- with (base.g[base.g$largeProv==0,]
                          , rdplot (y=log (mag), x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0.5, 1.5)
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label="district magnitude (log)"
                                    , x.label="")))
# dev.off ()
# png ("figBalQSMVpj09sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj09sm <- with (base.p[base.p$largeProv==0,]
                         , rdplot (y=log (mag), x=running
                                   , p=2, binselect="qsmv", scale=1
                                   , kernel="uniform"
                                   , x.lim=c (-25, 25)
                                   , y.lim=c (0.5, 1.5)
                                   , yaxt="n"
                                   , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                   , col.dots=cdot, col.lines=cline
                                   , title=""
                                   , y.label=""
                                   , x.label="")))
# dev.off ()
# png ("figBalQSMVucr09sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr09sm <- with (base.r[base.r$largeProv==0,]
                          , rdplot (y=log (mag), x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0.5, 1.5)
                                    , yaxt="n"
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label=""
                                    , x.label="")))
# dev.off ()

## large magnitude election (0/1)
# png ("figBalQSMVgov10sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVgov10sm <- with (base.g[base.g$largeProv==0,]
                          , rdplot (y=largeMag2, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 0.9)
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label="large magnitude (0/1)"
                                    , x.label="")))
# dev.off ()
# png ("figBalQSMVpj10sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVpj10sm <- with (base.p[base.p$largeProv==0,]
                         , rdplot (y=largeMag2, x=running
                                   , p=2, binselect="qsmv", scale=1
                                   , kernel="uniform"
                                   , x.lim=c (-25, 25)
                                   , y.lim=c (0, 0.9)
                                   , yaxt="n"
                                   , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                   , col.dots=cdot, col.lines=cline
                                   , title=""
                                   , y.label=""
                                   , x.label="")))
# dev.off ()
# png ("figBalQSMVucr10sm.png", w=plotWidth, h=plotWidth/aspect.ratio)
# par (mfrow=c (1,1), mar=c (1.95,4.5,0.25,0.25))
(pBalQSMVucr10sm <- with (base.r[base.r$largeProv==0,]
                          , rdplot (y=largeMag2, x=running
                                    , p=2, binselect="qsmv", scale=1
                                    , kernel="uniform"
                                    , x.lim=c (-25, 25)
                                    , y.lim=c (0, 0.9)
                                    , yaxt="n"
                                    , cex=cex.def*0.9, cex.main=cex.def, cex.lab=cex.def*0.8, cex.axis=cex.def*2/3
                                    , col.dots=cdot, col.lines=cline
                                    , title=""
                                    , y.label=""
                                    , x.label="")))
# dev.off ()

dev.off ()


### Figures A13-A15 (alternative bandwidths)

# creating the objects for pre-processing the data
h <- seq (2, 18, by=1/2)
(r <- length (h))

store.g <- store.g2 <- as.data.frame (matrix (nrow=r, ncol=6))
colnames (store.g) <- colnames (store.g2) <- c ("bwd", "N", "difMean", "estim", "low95", "high95")
list.g <- list.g2 <- list (renom=store.g, legAfter=store.g, exeAfter=store.g, anyAfter=store.g, valAfter.eq=store.g)
store.p <- store.p2 <- as.data.frame (matrix (nrow=r, ncol=6))
colnames (store.p) <- colnames (store.p2) <- c ("bwd", "N", "difMean", "estim", "low95", "high95")
list.p <- list.p2 <- list (renom=store.p, legAfter=store.p, exeAfter=store.p, anyAfter=store.p, valAfter.eq=store.p)
store.r <- store.r2 <- as.data.frame (matrix (nrow=r, ncol=6))
colnames (store.r) <- colnames (store.r2) <- c ("bwd", "N", "difMean", "estim", "low95", "high95")
list.r <- list.r2 <- list (renom=store.r, legAfter=store.r, exeAfter=store.r, anyAfter=store.r, valAfter.eq=store.r)

# doing the loop
for (i in 1:r){
  
  ## (1) Governor's party
  
  # t-test
  mean.g01a <- t.test (base.g[base.g$running > 0 & abs (base.g$running) <= h[i],]$renom, base.g[base.g$running < 0 & abs (base.g$running) <= h[i],]$renom)$estimate
  mean.g01b <- t.test (base.g[base.g$largeProv==0 & base.g$running > 0 & abs (base.g$running) <= h[i],]$renom, base.g[base.g$largeProv==0 & base.g$running < 0 & abs (base.g$running) <= h[i],]$renom)$estimate
  
  mean.g02a <- t.test (base.g[base.g$running > 0 & abs (base.g$running) <= h[i],]$legAfter, base.g[base.g$running < 0 & abs (base.g$running) <= h[i],]$legAfter)$estimate
  mean.g02b <- t.test (base.g[base.g$largeProv==0 & base.g$running > 0 & abs (base.g$running) <= h[i],]$legAfter, base.g[base.g$largeProv==0 & base.g$running < 0 & abs (base.g$running) <= h[i],]$legAfter)$estimate
  
  mean.g03a <- t.test (base.g[base.g$running > 0 & abs (base.g$running) <= h[i],]$exeAfter, base.g[base.g$running < 0 & abs (base.g$running) <= h[i],]$exeAfter)$estimate
  mean.g03b <- t.test (base.g[base.g$largeProv==0 & base.g$running > 0 & abs (base.g$running) <= h[i],]$exeAfter, base.g[base.g$largeProv==0 & base.g$running < 0 & abs (base.g$running) <= h[i],]$exeAfter)$estimate
  
  mean.g04a <- t.test (base.g[base.g$running > 0 & abs (base.g$running) <= h[i],]$anyAfter, base.g[base.g$running < 0 & abs (base.g$running) <= h[i],]$anyAfter)$estimate
  mean.g04b <- t.test (base.g[base.g$largeProv==0 & base.g$running > 0 & abs (base.g$running) <= h[i],]$anyAfter, base.g[base.g$largeProv==0 & base.g$running < 0 & abs (base.g$running) <= h[i],]$anyAfter)$estimate
  
  mean.g05a <- t.test (base.g[base.g$running > 0 & abs (base.g$running) <= h[i],]$valAfter.eq, base.g[base.g$running < 0 & abs (base.g$running) <= h[i],]$valAfter.eq)$estimate
  mean.g05b <- t.test (base.g[base.g$largeProv==0 & base.g$running > 0 & abs (base.g$running) <= h[i],]$valAfter.eq, base.g[base.g$largeProv==0 & base.g$running < 0 & abs (base.g$running) <= h[i],]$valAfter.eq)$estimate
  
  # RDD
  mTmp.g01a <- with (base.g, rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.g01b <- with (base.g[base.g$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  mTmp.g02a <- with (base.g, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.g02b <- with (base.g[base.g$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  mTmp.g03a <- with (base.g, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.g03b <- with (base.g[base.g$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  mTmp.g04a <- with (base.g, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.g04b <- with (base.g[base.g$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  mTmp.g05a <- with (base.g, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.g05b <- with (base.g[base.g$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  # storage
  list.g$renom[i,1] <- h[i]  ## bandwidth
  list.g$renom[i,2] <- sum (mTmp.g01a$Nh) ## total number of observations
  list.g$renom[i,3] <- mean.g01a[1] - mean.g01a[2] ## difference of means
  list.g$renom[i,4] <- mTmp.g01a$coef[1]  ## RD bias-corrected point estimate
  list.g$renom[i,5:6] <- mTmp.g01a$ci[3,] ## RD bias-corrected 95% CI
  list.g2$renom[i,1] <- h[i]
  list.g2$renom[i,2] <- sum (mTmp.g01b$Nh)
  list.g2$renom[i,3] <- mean.g01b[1] - mean.g01b[2]
  list.g2$renom[i,4] <- mTmp.g01b$coef[1]
  list.g2$renom[i,5:6] <- mTmp.g01b$ci[3,]
  
  list.g$legAfter[i,1] <- h[i]
  list.g$legAfter[i,2] <- sum (mTmp.g02a$Nh)
  list.g$legAfter[i,3] <- mean.g02a[1] - mean.g02a[2]
  list.g$legAfter[i,4] <- mTmp.g02a$coef[1]
  list.g$legAfter[i,5:6] <- mTmp.g02a$ci[3,]
  list.g2$legAfter[i,1] <- h[i]
  list.g2$legAfter[i,2] <- sum (mTmp.g02b$Nh)
  list.g2$legAfter[i,3] <- mean.g02b[1] - mean.g02b[2]
  list.g2$legAfter[i,4] <- mTmp.g02b$coef[1]
  list.g2$legAfter[i,5:6] <- mTmp.g02b$ci[3,]
  
  list.g$exeAfter[i,1] <- h[i]
  list.g$exeAfter[i,2] <- sum (mTmp.g03a$Nh)
  list.g$exeAfter[i,3] <- mean.g03a[1] - mean.g03a[2]
  list.g$exeAfter[i,4] <- mTmp.g03a$coef[1]
  list.g$exeAfter[i,5:6] <- mTmp.g03a$ci[3,]
  list.g2$exeAfter[i,1] <- h[i]
  list.g2$exeAfter[i,2] <- sum (mTmp.g03b$Nh)
  list.g2$exeAfter[i,3] <- mean.g03b[1] - mean.g03b[2]
  list.g2$exeAfter[i,4] <- mTmp.g03b$coef[1]
  list.g2$exeAfter[i,5:6] <- mTmp.g03b$ci[3,]
  
  list.g$anyAfter[i,1] <- h[i]
  list.g$anyAfter[i,2] <- sum (mTmp.g04a$Nh)
  list.g$anyAfter[i,3] <- mean.g04a[1] - mean.g04a[2]
  list.g$anyAfter[i,4] <- mTmp.g04a$coef[1]
  list.g$anyAfter[i,5:6] <- mTmp.g04a$ci[3,]
  list.g2$anyAfter[i,1] <- h[i]
  list.g2$anyAfter[i,2] <- sum (mTmp.g04b$Nh)
  list.g2$anyAfter[i,3] <- mean.g04b[1] - mean.g04b[2]
  list.g2$anyAfter[i,4] <- mTmp.g04b$coef[1]
  list.g2$anyAfter[i,5:6] <- mTmp.g04b$ci[3,]
  
  list.g$valAfter.eq[i,1] <- h[i]
  list.g$valAfter.eq[i,2] <- sum (mTmp.g05a$Nh)
  list.g$valAfter.eq[i,3] <- mean.g05a[1] - mean.g05a[2]
  list.g$valAfter.eq[i,4] <- mTmp.g05a$coef[1]
  list.g$valAfter.eq[i,5:6] <- mTmp.g05a$ci[3,]
  list.g2$valAfter.eq[i,1] <- h[i]
  list.g2$valAfter.eq[i,2] <- sum (mTmp.g05b$Nh)
  list.g2$valAfter.eq[i,3] <- mean.g05b[1] - mean.g05b[2]
  list.g2$valAfter.eq[i,4] <- mTmp.g05b$coef[1]
  list.g2$valAfter.eq[i,5:6] <- mTmp.g05b$ci[3,]
  
  
  ## (2) PJ
  
  # t-test
  mean.p01a <- t.test (base.p[base.p$running > 0 & abs (base.p$running) <= h[i],]$renom, base.p[base.p$running < 0 & abs (base.p$running) <= h[i],]$renom)$estimate
  mean.p01b <- t.test (base.p[base.p$largeProv==0 & base.p$running > 0 & abs (base.p$running) <= h[i],]$renom, base.p[base.p$largeProv==0 & base.p$running < 0 & abs (base.p$running) <= h[i],]$renom)$estimate
  
  mean.p02a <- t.test (base.p[base.p$running > 0 & abs (base.p$running) <= h[i],]$legAfter, base.p[base.p$running < 0 & abs (base.p$running) <= h[i],]$legAfter)$estimate
  mean.p02b <- t.test (base.p[base.p$largeProv==0 & base.p$running > 0 & abs (base.p$running) <= h[i],]$legAfter, base.p[base.p$largeProv==0 & base.p$running < 0 & abs (base.p$running) <= h[i],]$legAfter)$estimate
  
  mean.p03a <- t.test (base.p[base.p$running > 0 & abs (base.p$running) <= h[i],]$exeAfter, base.p[base.p$running < 0 & abs (base.p$running) <= h[i],]$exeAfter)$estimate
  mean.p03b <- t.test (base.p[base.p$largeProv==0 & base.p$running > 0 & abs (base.p$running) <= h[i],]$exeAfter, base.p[base.p$largeProv==0 & base.p$running < 0 & abs (base.p$running) <= h[i],]$exeAfter)$estimate
  
  mean.p04a <- t.test (base.p[base.p$running > 0 & abs (base.p$running) <= h[i],]$anyAfter, base.p[base.p$running < 0 & abs (base.p$running) <= h[i],]$anyAfter)$estimate
  mean.p04b <- t.test (base.p[base.p$largeProv==0 & base.p$running > 0 & abs (base.p$running) <= h[i],]$anyAfter, base.p[base.p$largeProv==0 & base.p$running < 0 & abs (base.p$running) <= h[i],]$anyAfter)$estimate
  
  mean.p05a <- t.test (base.p[base.p$running > 0 & abs (base.p$running) <= h[i],]$valAfter.eq, base.p[base.p$running < 0 & abs (base.p$running) <= h[i],]$valAfter.eq)$estimate
  mean.p05b <- t.test (base.p[base.p$largeProv==0 & base.p$running > 0 & abs (base.p$running) <= h[i],]$valAfter.eq, base.p[base.p$largeProv==0 & base.p$running < 0 & abs (base.p$running) <= h[i],]$valAfter.eq)$estimate
  
  # RDD
  mTmp.p01a <- with (base.p, rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.p01b <- with (base.p[base.p$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  mTmp.p02a <- with (base.p, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.p02b <- with (base.p[base.p$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  mTmp.p03a <- with (base.p, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.p03b <- with (base.p[base.p$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  mTmp.p04a <- with (base.p, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.p04b <- with (base.p[base.p$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  mTmp.p05a <- with (base.p, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.p05b <- with (base.p[base.p$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  # storage
  list.p$renom[i,1] <- h[i]  ## bandwidth
  list.p$renom[i,2] <- sum (mTmp.p01a$Nh) ## total number of observations
  list.p$renom[i,3] <- mean.p01a[1] - mean.p01a[2] ## difference of means
  list.p$renom[i,4] <- mTmp.p01a$coef[1]  ## RD bias-corrected point estimate
  list.p$renom[i,5:6] <- mTmp.p01a$ci[3,] ## RD bias-corrected 95% CI
  list.p2$renom[i,1] <- h[i]
  list.p2$renom[i,2] <- sum (mTmp.p01b$Nh)
  list.p2$renom[i,3] <- mean.p01b[1] - mean.p01b[2]
  list.p2$renom[i,4] <- mTmp.p01b$coef[1]
  list.p2$renom[i,5:6] <- mTmp.p01b$ci[3,]
  
  list.p$legAfter[i,1] <- h[i]
  list.p$legAfter[i,2] <- sum (mTmp.p02a$Nh)
  list.p$legAfter[i,3] <- mean.p02a[1] - mean.p02a[2]
  list.p$legAfter[i,4] <- mTmp.p02a$coef[1]
  list.p$legAfter[i,5:6] <- mTmp.p02a$ci[3,]
  list.p2$legAfter[i,1] <- h[i]
  list.p2$legAfter[i,2] <- sum (mTmp.p02b$Nh)
  list.p2$legAfter[i,3] <- mean.p02b[1] - mean.p02b[2]
  list.p2$legAfter[i,4] <- mTmp.p02b$coef[1]
  list.p2$legAfter[i,5:6] <- mTmp.p02b$ci[3,]
  
  list.p$exeAfter[i,1] <- h[i]
  list.p$exeAfter[i,2] <- sum (mTmp.p03a$Nh)
  list.p$exeAfter[i,3] <- mean.p03a[1] - mean.p03a[2]
  list.p$exeAfter[i,4] <- mTmp.p03a$coef[1]
  list.p$exeAfter[i,5:6] <- mTmp.p03a$ci[3,]
  list.p2$exeAfter[i,1] <- h[i]
  list.p2$exeAfter[i,2] <- sum (mTmp.p03b$Nh)
  list.p2$exeAfter[i,3] <- mean.p03b[1] - mean.p03b[2]
  list.p2$exeAfter[i,4] <- mTmp.p03b$coef[1]
  list.p2$exeAfter[i,5:6] <- mTmp.p03b$ci[3,]
  
  list.p$anyAfter[i,1] <- h[i]
  list.p$anyAfter[i,2] <- sum (mTmp.p04a$Nh)
  list.p$anyAfter[i,3] <- mean.p04a[1] - mean.p04a[2]
  list.p$anyAfter[i,4] <- mTmp.p04a$coef[1]
  list.p$anyAfter[i,5:6] <- mTmp.p04a$ci[3,]
  list.p2$anyAfter[i,1] <- h[i]
  list.p2$anyAfter[i,2] <- sum (mTmp.p04b$Nh)
  list.p2$anyAfter[i,3] <- mean.p04b[1] - mean.p04b[2]
  list.p2$anyAfter[i,4] <- mTmp.p04b$coef[1]
  list.p2$anyAfter[i,5:6] <- mTmp.p04b$ci[3,]
  
  list.p$valAfter.eq[i,1] <- h[i]
  list.p$valAfter.eq[i,2] <- sum (mTmp.p05a$Nh)
  list.p$valAfter.eq[i,3] <- mean.p05a[1] - mean.p05a[2]
  list.p$valAfter.eq[i,4] <- mTmp.p05a$coef[1]
  list.p$valAfter.eq[i,5:6] <- mTmp.p05a$ci[3,]
  list.p2$valAfter.eq[i,1] <- h[i]
  list.p2$valAfter.eq[i,2] <- sum (mTmp.p05b$Nh)
  list.p2$valAfter.eq[i,3] <- mean.p05b[1] - mean.p05b[2]
  list.p2$valAfter.eq[i,4] <- mTmp.p05b$coef[1]
  list.p2$valAfter.eq[i,5:6] <- mTmp.p05b$ci[3,]
  
  
  ## (3) UCR
  
  # t-test
  mean.r01a <- t.test (base.r[base.r$running > 0 & abs (base.r$running) <= h[i],]$renom, base.r[base.r$running < 0 & abs (base.r$running) <= h[i],]$renom)$estimate
  mean.r01b <- t.test (base.r[base.r$largeProv==0 & base.r$running > 0 & abs (base.r$running) <= h[i],]$renom, base.r[base.r$largeProv==0 & base.r$running < 0 & abs (base.r$running) <= h[i],]$renom)$estimate
  
  mean.r02a <- t.test (base.r[base.r$running > 0 & abs (base.r$running) <= h[i],]$legAfter, base.r[base.r$running < 0 & abs (base.r$running) <= h[i],]$legAfter)$estimate
  mean.r02b <- t.test (base.r[base.r$largeProv==0 & base.r$running > 0 & abs (base.r$running) <= h[i],]$legAfter, base.r[base.r$largeProv==0 & base.r$running < 0 & abs (base.r$running) <= h[i],]$legAfter)$estimate
  
  mean.r03a <- t.test (base.r[base.r$running > 0 & abs (base.r$running) <= h[i],]$exeAfter, base.r[base.r$running < 0 & abs (base.r$running) <= h[i],]$exeAfter)$estimate
  mean.r03b <- t.test (base.r[base.r$largeProv==0 & base.r$running > 0 & abs (base.r$running) <= h[i],]$exeAfter, base.r[base.r$largeProv==0 & base.r$running < 0 & abs (base.r$running) <= h[i],]$exeAfter)$estimate
  
  mean.r04a <- t.test (base.r[base.r$running > 0 & abs (base.r$running) <= h[i],]$anyAfter, base.r[base.r$running < 0 & abs (base.r$running) <= h[i],]$anyAfter)$estimate
  mean.r04b <- t.test (base.r[base.r$largeProv==0 & base.r$running > 0 & abs (base.r$running) <= h[i],]$anyAfter, base.r[base.r$largeProv==0 & base.r$running < 0 & abs (base.r$running) <= h[i],]$anyAfter)$estimate
  
  mean.r05a <- t.test (base.r[base.r$running > 0 & abs (base.r$running) <= h[i],]$valAfter.eq, base.r[base.r$running < 0 & abs (base.r$running) <= h[i],]$valAfter.eq)$estimate
  mean.r05b <- t.test (base.r[base.r$largeProv==0 & base.r$running > 0 & abs (base.r$running) <= h[i],]$valAfter.eq, base.r[base.r$largeProv==0 & base.r$running < 0 & abs (base.r$running) <= h[i],]$valAfter.eq)$estimate
  
  # RDD
  mTmp.r01a <- with (base.r, rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.r01b <- with (base.r[base.r$largeProv==0,], rdrobust (y=renom, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  mTmp.r02a <- with (base.r, rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.r02b <- with (base.r[base.r$largeProv==0,], rdrobust (y=legAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  mTmp.r03a <- with (base.r, rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.r03b <- with (base.r[base.r$largeProv==0,], rdrobust (y=exeAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  mTmp.r04a <- with (base.r, rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.r04b <- with (base.r[base.r$largeProv==0,], rdrobust (y=anyAfter, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  mTmp.r05a <- with (base.r, rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  mTmp.r05b <- with (base.r[base.r$largeProv==0,], rdrobust (y=valAfter.eq, x=running, fuzzy=NULL, covs=NULL, cluster=district, h=h[i], level=95, p=1, q=2))
  
  # storage
  list.r$renom[i,1] <- h[i]  ## bandwidth
  list.r$renom[i,2] <- sum (mTmp.r01a$Nh) ## total number of observations
  list.r$renom[i,3] <- mean.r01a[1] - mean.r01a[2] ## difference of means
  list.r$renom[i,4] <- mTmp.r01a$coef[1]  ## RD bias-corrected point estimate
  list.r$renom[i,5:6] <- mTmp.r01a$ci[3,] ## RD bias-corrected 95% CI
  list.r2$renom[i,1] <- h[i]
  list.r2$renom[i,2] <- sum (mTmp.r01b$Nh)
  list.r2$renom[i,3] <- mean.r01b[1] - mean.r01b[2]
  list.r2$renom[i,4] <- mTmp.r01b$coef[1]
  list.r2$renom[i,5:6] <- mTmp.r01b$ci[3,]
  
  list.r$legAfter[i,1] <- h[i]
  list.r$legAfter[i,2] <- sum (mTmp.r02a$Nh)
  list.r$legAfter[i,3] <- mean.r02a[1] - mean.r02a[2]
  list.r$legAfter[i,4] <- mTmp.r02a$coef[1]
  list.r$legAfter[i,5:6] <- mTmp.r02a$ci[3,]
  list.r2$legAfter[i,1] <- h[i]
  list.r2$legAfter[i,2] <- sum (mTmp.r02b$Nh)
  list.r2$legAfter[i,3] <- mean.r02b[1] - mean.r02b[2]
  list.r2$legAfter[i,4] <- mTmp.r02b$coef[1]
  list.r2$legAfter[i,5:6] <- mTmp.r02b$ci[3,]
  
  list.r$exeAfter[i,1] <- h[i]
  list.r$exeAfter[i,2] <- sum (mTmp.r03a$Nh)
  list.r$exeAfter[i,3] <- mean.r03a[1] - mean.r03a[2]
  list.r$exeAfter[i,4] <- mTmp.r03a$coef[1]
  list.r$exeAfter[i,5:6] <- mTmp.r03a$ci[3,]
  list.r2$exeAfter[i,1] <- h[i]
  list.r2$exeAfter[i,2] <- sum (mTmp.r03b$Nh)
  list.r2$exeAfter[i,3] <- mean.r03b[1] - mean.r03b[2]
  list.r2$exeAfter[i,4] <- mTmp.r03b$coef[1]
  list.r2$exeAfter[i,5:6] <- mTmp.r03b$ci[3,]
  
  list.r$anyAfter[i,1] <- h[i]
  list.r$anyAfter[i,2] <- sum (mTmp.r04a$Nh)
  list.r$anyAfter[i,3] <- mean.r04a[1] - mean.r04a[2]
  list.r$anyAfter[i,4] <- mTmp.r04a$coef[1]
  list.r$anyAfter[i,5:6] <- mTmp.r04a$ci[3,]
  list.r2$anyAfter[i,1] <- h[i]
  list.r2$anyAfter[i,2] <- sum (mTmp.r04b$Nh)
  list.r2$anyAfter[i,3] <- mean.r04b[1] - mean.r04b[2]
  list.r2$anyAfter[i,4] <- mTmp.r04b$coef[1]
  list.r2$anyAfter[i,5:6] <- mTmp.r04b$ci[3,]
  
  list.r$valAfter.eq[i,1] <- h[i]
  list.r$valAfter.eq[i,2] <- sum (mTmp.r05a$Nh)
  list.r$valAfter.eq[i,3] <- mean.r05a[1] - mean.r05a[2]
  list.r$valAfter.eq[i,4] <- mTmp.r05a$coef[1]
  list.r$valAfter.eq[i,5:6] <- mTmp.r05a$ci[3,]
  list.r2$valAfter.eq[i,1] <- h[i]
  list.r2$valAfter.eq[i,2] <- sum (mTmp.r05b$Nh)
  list.r2$valAfter.eq[i,3] <- mean.r05b[1] - mean.r05b[2]
  list.r2$valAfter.eq[i,4] <- mTmp.r05b$coef[1]
  list.r2$valAfter.eq[i,5:6] <- mTmp.r05b$ci[3,]
}


## Governor's party

png ("Figure A13.png", w=plotWidth*2.4, h=plotWidth*3.6)
par (mfcol=c (5,2), mar=c (3.5,5.5,3,0.1))

## All provinces

## renomination
# png ("figBwdGov01.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.g$renom, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.g$renom$low95, list.g2$renom$low95), max (list.g$renom$high95, list.g2$renom$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02gov_01a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_01a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_01a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.g$renom, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.g$renom, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.g$renom, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02gov_01a4$bws[1,1]+e*4, y=min (list.g$renom$low95, list.g2$renom$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.g$renom, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.g$renom$N)), ylim=c (min (list.g$renom$low95, list.g2$renom$low95), max (list.g$renom$high95, list.g2$renom$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="effect of winning a seat\non renomination (0/1)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()

## legislator (after)
# png ("figBwdGov02.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.g$legAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.g$legAfter$low95, list.g2$legAfter$low95), max (list.g$legAfter$high95, list.g2$legAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02gov_02a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_02a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_02a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.g$legAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.g$legAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.g$legAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02gov_02a4$bws[1,1]+e*4, y=min (list.g$legAfter$low95, list.g2$legAfter$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.g$legAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.g$legAfter$N)), ylim=c (min (list.g$legAfter$low95, list.g2$legAfter$low95), max (list.g$legAfter$high95, list.g2$legAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="effect of winning a seat\non legislator (after) (0/1)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()

## executive (after)
# png ("figBwdGov03.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.g$exeAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.g$exeAfter$low95, list.g2$exeAfter$low95), max (list.g$exeAfter$high95, list.g2$exeAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02gov_03a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_03a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_03a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.g$exeAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.g$exeAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.g$exeAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02gov_03a4$bws[1,1]+e*4, y=min (list.g$exeAfter$low95, list.g2$exeAfter$low95)+e*0.10, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.g$exeAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.g$exeAfter$N)), ylim=c (min (list.g$exeAfter$low95, list.g2$exeAfter$low95), max (list.g$exeAfter$high95, list.g2$exeAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="effect of winning a seat\non executive (after) (0/1)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()

## any office (after)
# png ("figBwdGov04.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.g$anyAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.g$anyAfter$low95, list.g2$anyAfter$low95), max (list.g$anyAfter$high95, list.g2$anyAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02gov_05a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_05a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_05a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.g$anyAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.g$anyAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.g$anyAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02gov_05a4$bws[1,1]+e*4, y=min (list.g$anyAfter$low95, list.g2$anyAfter$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.g$anyAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.g$anyAfter$N)), ylim=c (min (list.g$anyAfter$low95, list.g2$anyAfter$low95), max (list.g$anyAfter$high95, list.g2$anyAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="effect of winning a seat\non any office (after) (0/1)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()

## terms served (after)
# png ("figBwdGov05.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.g$valAfter.eq, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.g$valAfter.eq$low95, list.g2$valAfter.eq$low95), max (list.g$valAfter.eq$high95, list.g2$valAfter.eq$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02gov_06a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_06a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_06a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.g$valAfter.eq, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.g$valAfter.eq, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.g$valAfter.eq, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02gov_06a4$bws[1,1]+e*4, y=min (list.g$valAfter.eq$low95, list.g2$valAfter.eq$low95)+e*0.500, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.g$valAfter.eq, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.g$valAfter.eq$N)), ylim=c (min (list.g$valAfter.eq$low95, list.g2$valAfter.eq$low95), max (list.g$valAfter.eq$high95, list.g2$valAfter.eq$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="vote change to last seat (%)", side=1, line=2.25, cex=cex.def*0.6)
mtext (text="effect of winning a seat\non terms served (after)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()


## Small provinces (M <= 5) only

## renomination
# png ("figBwdGov01sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.g2$renom, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.g$renom$low95, list.g2$renom$low95), max (list.g$renom$high95, list.g2$renom$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02gov_01d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_01d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_01d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.g2$renom, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.g2$renom, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.g2$renom, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02gov_01d4$bws[1,1]+e*4, y=min (list.g$renom$low95, list.g2$renom$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.g2$renom, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.g2$renom$N)), ylim=c (min (list.g$renom$low95, list.g2$renom$low95), max (list.g$renom$high95, list.g2$renom$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
# dev.off ()

## legislator (after)
# png ("figBwdGov02sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.g2$legAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.g$legAfter$low95, list.g2$legAfter$low95), max (list.g$legAfter$high95, list.g2$legAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02gov_02d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_02d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_02d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.g2$legAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.g2$legAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.g2$legAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02gov_02d4$bws[1,1]+e*4, y=min (list.g$legAfter$low95, list.g2$legAfter$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.g2$legAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.g2$legAfter$N)), ylim=c (min (list.g$legAfter$low95, list.g2$legAfter$low95), max (list.g$legAfter$high95, list.g2$legAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
# dev.off ()

## executive (after)
# png ("figBwdGov03sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.g2$exeAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.g$exeAfter$low95, list.g2$exeAfter$low95), max (list.g$exeAfter$high95, list.g2$exeAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02gov_03d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_03d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_03d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.g2$exeAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.g2$exeAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.g2$exeAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02gov_03d4$bws[1,1]+e*4, y=min (list.g$exeAfter$low95, list.g2$exeAfter$low95)+e*0.10, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.g2$exeAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.g2$exeAfter$N)), ylim=c (min (list.g$exeAfter$low95, list.g2$exeAfter$low95), max (list.g$exeAfter$high95, list.g2$exeAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
# dev.off ()

## any office (after)
# png ("figBwdGov04sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.g2$anyAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.g$anyAfter$low95, list.g2$anyAfter$low95), max (list.g$anyAfter$high95, list.g2$anyAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02gov_05d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_05d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_05d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.g2$anyAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.g2$anyAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.g2$anyAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02gov_05d4$bws[1,1]+e*4, y=min (list.g$anyAfter$low95, list.g2$anyAfter$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.g2$anyAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.g2$anyAfter$N)), ylim=c (min (list.g$anyAfter$low95, list.g2$anyAfter$low95), max (list.g$anyAfter$high95, list.g2$anyAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
# dev.off ()

## terms served (after)
# png ("figBwdGov05sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.g2$valAfter.eq, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.g$valAfter.eq$low95, list.g2$valAfter.eq$low95), max (list.g$valAfter.eq$high95, list.g2$valAfter.eq$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02gov_06d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_06d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02gov_06d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.g2$valAfter.eq, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.g2$valAfter.eq, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.g2$valAfter.eq, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02gov_06d4$bws[1,1]+e*4, y=min (list.g$valAfter.eq$low95, list.g2$valAfter.eq$low95)+e*0.500, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.g2$valAfter.eq, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.g2$valAfter.eq$N)), ylim=c (min (list.g$valAfter.eq$low95, list.g2$valAfter.eq$low95), max (list.g$valAfter.eq$high95, list.g2$valAfter.eq$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="vote change to last seat (%)", side=1, line=2.25, cex=cex.def*0.6)
# dev.off ()

dev.off ()


## PJ

png ("Figure A14.png", w=plotWidth*2.4, h=plotWidth*3.6)
par (mfcol=c (5,2), mar=c (3.5,5.5,3,0.1))

## All provinces

## renomination
# png ("figBwdPJ01.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.p$renom, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.p$renom$low95, list.p2$renom$low95), max (list.p$renom$high95, list.p2$renom$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02pj_01a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_01a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_01a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.p$renom, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.p$renom, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.p$renom, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02pj_01a4$bws[1,1]+e*4, y=min (list.p$renom$low95, list.p2$renom$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.p$renom, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.p$renom$N)), ylim=c (min (list.p$renom$low95, list.p2$renom$low95), max (list.p$renom$high95, list.p2$renom$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="effect of winning a seat\non renomination (0/1)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()

## legislator (after)
# png ("figBwdPJ02.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.p$legAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.p$legAfter$low95, list.p2$legAfter$low95), max (list.p$legAfter$high95, list.p2$legAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02pj_02a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_02a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_02a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.p$legAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.p$legAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.p$legAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02pj_02a4$bws[1,1]+e*4, y=min (list.p$legAfter$low95, list.p2$legAfter$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.p$legAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.p$legAfter$N)), ylim=c (min (list.p$legAfter$low95, list.p2$legAfter$low95), max (list.p$legAfter$high95, list.p2$legAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="effect of winning a seat\non legislator (after) (0/1)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()

## executive (after)
# png ("figBwdPJ03.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.p$exeAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.p$exeAfter$low95, list.p2$exeAfter$low95), max (list.p$exeAfter$high95, list.p2$exeAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02pj_03a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_03a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_03a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.p$exeAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.p$exeAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.p$exeAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02pj_03a4$bws[1,1]+e*4, y=min (list.p$exeAfter$low95, list.p2$exeAfter$low95)+e*0.10, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.p$exeAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.p$exeAfter$N)), ylim=c (min (list.p$exeAfter$low95, list.p2$exeAfter$low95), max (list.p$exeAfter$high95, list.p2$exeAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="effect of winning a seat\non executive (after) (0/1)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()

## any office (after)
# png ("figBwdPJ04.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.p$anyAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.p$anyAfter$low95, list.p2$anyAfter$low95), max (list.p$anyAfter$high95, list.p2$anyAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02pj_05a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_05a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_05a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.p$anyAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.p$anyAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.p$anyAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02pj_05a4$bws[1,1]+e*4, y=min (list.p$anyAfter$low95, list.p2$anyAfter$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.p$anyAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.p$anyAfter$N)), ylim=c (min (list.p$anyAfter$low95, list.p2$anyAfter$low95), max (list.p$anyAfter$high95, list.p2$anyAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="effect of winning a seat\non any office (after) (0/1)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()

## terms served (after)
# png ("figBwdPJ05.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.p$valAfter.eq, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.p$valAfter.eq$low95, list.p2$valAfter.eq$low95), max (list.p$valAfter.eq$high95, list.p2$valAfter.eq$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02pj_06a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_06a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_06a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.p$valAfter.eq, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.p$valAfter.eq, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.p$valAfter.eq, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02pj_06a4$bws[1,1]+e*4, y=min (list.p$valAfter.eq$low95, list.p2$valAfter.eq$low95)+e*0.500, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.p$valAfter.eq, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.p$valAfter.eq$N)), ylim=c (min (list.p$valAfter.eq$low95, list.p2$valAfter.eq$low95), max (list.p$valAfter.eq$high95, list.p2$valAfter.eq$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="vote change to last seat (%)", side=1, line=2.25, cex=cex.def*0.6)
mtext (text="effect of winning a seat\non terms served (after)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()


## Small provinces (M <= 5) only

## renomination
# png ("figBwdPJ01sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.p2$renom, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.p$renom$low95, list.p2$renom$low95), max (list.p$renom$high95, list.p2$renom$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02pj_01d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_01d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_01d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.p2$renom, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.p2$renom, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.p2$renom, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02pj_01d4$bws[1,1]+e*4, y=min (list.p$renom$low95, list.p2$renom$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.p2$renom, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.p2$renom$N)), ylim=c (min (list.p$renom$low95, list.p2$renom$low95), max (list.p$renom$high95, list.p2$renom$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
# dev.off ()

## legislator (after)
# png ("figBwdPJ02sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.p2$legAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.p$legAfter$low95, list.p2$legAfter$low95), max (list.p$legAfter$high95, list.p2$legAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02pj_02d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_02d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_02d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.p2$legAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.p2$legAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.p2$legAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02pj_02d4$bws[1,1]+e*4, y=min (list.p$legAfter$low95, list.p2$legAfter$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.p2$legAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.p2$legAfter$N)), ylim=c (min (list.p$legAfter$low95, list.p2$legAfter$low95), max (list.p$legAfter$high95, list.p2$legAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
# dev.off ()

## executive (after)
# png ("figBwdPJ03sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.p2$exeAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.p$exeAfter$low95, list.p2$exeAfter$low95), max (list.p$exeAfter$high95, list.p2$exeAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02pj_03d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_03d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_03d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.p2$exeAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.p2$exeAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.p2$exeAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02pj_03d4$bws[1,1]+e*4, y=min (list.p$exeAfter$low95, list.p2$exeAfter$low95)+e*0.10, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.p2$exeAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.p2$exeAfter$N)), ylim=c (min (list.p$exeAfter$low95, list.p2$exeAfter$low95), max (list.p$exeAfter$high95, list.p2$exeAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
# dev.off ()

## any office (after)
# png ("figBwdPJ04sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.p2$anyAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.p$anyAfter$low95, list.p2$anyAfter$low95), max (list.p$anyAfter$high95, list.p2$anyAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02pj_05d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_05d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_05d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.p2$anyAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.p2$anyAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.p2$anyAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02pj_05d4$bws[1,1]+e*4, y=min (list.p$anyAfter$low95, list.p2$anyAfter$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.p2$anyAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.p2$anyAfter$N)), ylim=c (min (list.p$anyAfter$low95, list.p2$anyAfter$low95), max (list.p$anyAfter$high95, list.p2$anyAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
# dev.off ()

## terms served (after)
# png ("figBwdPJ05sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.p2$valAfter.eq, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.p$valAfter.eq$low95, list.p2$valAfter.eq$low95), max (list.p$valAfter.eq$high95, list.p2$valAfter.eq$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02pj_06d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_06d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02pj_06d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.p2$valAfter.eq, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.p2$valAfter.eq, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.p2$valAfter.eq, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02pj_06d4$bws[1,1]+e*4, y=min (list.p$valAfter.eq$low95, list.p2$valAfter.eq$low95)+e*0.500, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.p2$valAfter.eq, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.p2$valAfter.eq$N)), ylim=c (min (list.p$valAfter.eq$low95, list.p2$valAfter.eq$low95), max (list.p$valAfter.eq$high95, list.p2$valAfter.eq$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="vote change to last seat (%)", side=1, line=2.25, cex=cex.def*0.6)
# dev.off ()

dev.off ()


## UCR

png ("Figure A15.png", w=plotWidth*2.4, h=plotWidth*3.6)
par (mfcol=c (5,2), mar=c (3.5,5.5,3,0.1))

## All provinces

## renomination
# png ("figBwdUCR01.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.r$renom, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.r$renom$low95, list.r2$renom$low95), max (list.r$renom$high95, list.r2$renom$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02ucr_01a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_01a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_01a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.r$renom, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.r$renom, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.r$renom, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02ucr_01a4$bws[1,1]+e*4, y=min (list.r$renom$low95, list.r2$renom$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.r$renom, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.r$renom$N)), ylim=c (min (list.r$renom$low95, list.r2$renom$low95), max (list.r$renom$high95, list.r2$renom$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="effect of winning a seat\non renomination (0/1)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()

## legislator (after)
# png ("figBwdUCR02.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.r$legAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.r$legAfter$low95, list.r2$legAfter$low95), max (list.r$legAfter$high95, list.r2$legAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02ucr_02a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_02a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_02a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.r$legAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.r$legAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.r$legAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02ucr_02a4$bws[1,1]+e*4, y=min (list.r$legAfter$low95, list.r2$legAfter$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.r$legAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.r$legAfter$N)), ylim=c (min (list.r$legAfter$low95, list.r2$legAfter$low95), max (list.r$legAfter$high95, list.r2$legAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="effect of winning a seat\non legislator (after) (0/1)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()

## executive (after)
# png ("figBwdUCR03.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.r$exeAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.r$exeAfter$low95, list.r2$exeAfter$low95), max (list.r$exeAfter$high95, list.r2$exeAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02ucr_03a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_03a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_03a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.r$exeAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.r$exeAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.r$exeAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02ucr_03a4$bws[1,1]+e*4, y=min (list.r$exeAfter$low95, list.r2$exeAfter$low95)+e*0.10, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.r$exeAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.r$exeAfter$N)), ylim=c (min (list.r$exeAfter$low95, list.r2$exeAfter$low95), max (list.r$exeAfter$high95, list.r2$exeAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="effect of winning a seat\non executive (after) (0/1)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()

## any office (after)
# png ("figBwdUCR04.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.r$anyAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.r$anyAfter$low95, list.r2$anyAfter$low95), max (list.r$anyAfter$high95, list.r2$anyAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02ucr_05a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_05a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_05a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.r$anyAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.r$anyAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.r$anyAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02ucr_05a4$bws[1,1]+e*4, y=min (list.r$anyAfter$low95, list.r2$anyAfter$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.r$anyAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.r$anyAfter$N)), ylim=c (min (list.r$anyAfter$low95, list.r2$anyAfter$low95), max (list.r$anyAfter$high95, list.r2$anyAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="effect of winning a seat\non any office (after) (0/1)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()

## terms served (after)
# png ("figBwdUCR05.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.r$valAfter.eq, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.r$valAfter.eq$low95, list.r2$valAfter.eq$low95), max (list.r$valAfter.eq$high95, list.r2$valAfter.eq$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02ucr_06a4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_06a4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_06a4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.r$valAfter.eq, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.r$valAfter.eq, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.r$valAfter.eq, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02ucr_06a4$bws[1,1]+e*4, y=min (list.r$valAfter.eq$low95, list.r2$valAfter.eq$low95)+e*0.500, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.r$valAfter.eq, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.r$valAfter.eq$N)), ylim=c (min (list.r$valAfter.eq$low95, list.r2$valAfter.eq$low95), max (list.r$valAfter.eq$high95, list.r2$valAfter.eq$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="vote change to last seat (%)", side=1, line=2.25, cex=cex.def*0.6)
mtext (text="effect of winning a seat\non terms served (after)", side=2, line=2.25, cex=cex.def*0.6)
# dev.off ()


## Small provinces (M <= 5) only

## renomination
# png ("figBwdUCR01sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.r2$renom, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.r$renom$low95, list.r2$renom$low95), max (list.r$renom$high95, list.r2$renom$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02ucr_01d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_01d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_01d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.r2$renom, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.r2$renom, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.r2$renom, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02ucr_01d4$bws[1,1]+e*4, y=min (list.r$renom$low95, list.r2$renom$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.r2$renom, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.r2$renom$N)), ylim=c (min (list.r$renom$low95, list.r2$renom$low95), max (list.r$renom$high95, list.r2$renom$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
# dev.off ()

## legislator (after)
# png ("figBwdUCR02sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.r2$legAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.r$legAfter$low95, list.r2$legAfter$low95), max (list.r$legAfter$high95, list.r2$legAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02ucr_02d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_02d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_02d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.r2$legAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.r2$legAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.r2$legAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02ucr_02d4$bws[1,1]+e*4, y=min (list.r$legAfter$low95, list.r2$legAfter$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.r2$legAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.r2$legAfter$N)), ylim=c (min (list.r$legAfter$low95, list.r2$legAfter$low95), max (list.r$legAfter$high95, list.r2$legAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
# dev.off ()

## executive (after)
# png ("figBwdUCR03sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.r2$exeAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.r$exeAfter$low95, list.r2$exeAfter$low95), max (list.r$exeAfter$high95, list.r2$exeAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02ucr_03d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_03d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_03d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.r2$exeAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.r2$exeAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.r2$exeAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02ucr_03d4$bws[1,1]+e*4, y=min (list.r$exeAfter$low95, list.r2$exeAfter$low95)+e*0.10, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.r2$exeAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.r2$exeAfter$N)), ylim=c (min (list.r$exeAfter$low95, list.r2$exeAfter$low95), max (list.r$exeAfter$high95, list.r2$exeAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
# dev.off ()

## any office (after)
# png ("figBwdUCR04sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.r2$anyAfter, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.r$anyAfter$low95, list.r2$anyAfter$low95), max (list.r$anyAfter$high95, list.r2$anyAfter$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02ucr_05d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_05d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_05d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.r2$anyAfter, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.r2$anyAfter, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.r2$anyAfter, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02ucr_05d4$bws[1,1]+e*4, y=min (list.r$anyAfter$low95, list.r2$anyAfter$low95)+e*0.300, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.r2$anyAfter, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.r2$anyAfter$N)), ylim=c (min (list.r$anyAfter$low95, list.r2$anyAfter$low95), max (list.r$anyAfter$high95, list.r2$anyAfter$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
# dev.off ()

## terms served (after)
# png ("figBwdUCR05sm.png", h=(plotWidth*0.85), w=(plotWidth*0.85)/aspect.ratio*2.25)
# par (mfrow=c (1,1), mar=c (3.5,4.5,3,0.1))
with (list.r2$valAfter.eq, plot (x=bwd, y=difMean, type="l", xlim=c (0, 18), ylim=c (min (list.r$valAfter.eq$low95, list.r2$valAfter.eq$low95), max (list.r$valAfter.eq$high95, list.r2$valAfter.eq$high95)), col=cline, lwd=cex.def, axes=F, xlab="", ylab=""))
abline (h=0, lty=4, col="gray25", lwd=cex.def*0.75)
abline (v=m02ucr_06d4$bws[1,1], lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_06d4$bws[1,1]*0.5, lty=2, col="gray55", lwd=cex.def*0.85)
abline (v=m02ucr_06d4$bws[1,1]*2, lty=2, col="gray55", lwd=cex.def*0.85)
with (list.r2$valAfter.eq, points (x=bwd, y=estim, pch=16, col=cdot, cex=cex.def*0.45))
with (list.r2$valAfter.eq, lines (x=bwd, y=low95, lty=3, col=cdot, lwd=cex.def))
with (list.r2$valAfter.eq, lines (x=bwd, y=high95, lty=3, col=cdot, lwd=cex.def))
text (x=m02ucr_06d4$bws[1,1]+e*4, y=min (list.r$valAfter.eq$low95, list.r2$valAfter.eq$low95)+e*0.500, label="IMSE-optimal\nbwd.")
axis (side=1, at=seq (0, 18, by=3)); axis (side=2)
par (new = T)
with (list.r2$valAfter.eq, plot (x=N, y=difMean, type="n", xlim=c (0, max (list.r2$valAfter.eq$N)), ylim=c (min (list.r$valAfter.eq$low95, list.r2$valAfter.eq$low95), max (list.r$valAfter.eq$high95, list.r2$valAfter.eq$high95)), axes=F, xlab="", ylab=""))
axis (side=3, at=c (0, 10, 20, 50, 100, 200, 1000), cex.axis=cex.def*0.45, lwd=cex.def*0.30, lwd.ticks=cex.def*0.30, line=1)
mtext (text="number of observations", side=3, line=0, at=35, cex=cex.def*0.45)
mtext (text="vote change to last seat (%)", side=1, line=2.25, cex=cex.def*0.6)
# dev.off ()

dev.off ()



#%%%%%%%%%%%%%%%%%%%%%%%%%%%#
#### Building the tables ####
#%%%%%%%%%%%%%%%%%%%%%%%%%%%#

### Table 2
(tabMain01a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01a4$coef[1], m02gov_01a4$ci[3,], m02gov_01a4$pv[3], m02gov_01a4$bws[1,1], m02gov_01a4$Nh)
    , c (m02pj_01a4$coef[1], m02pj_01a4$ci[3,], m02pj_01a4$pv[3], m02pj_01a4$bws[1,1], m02pj_01a4$Nh)
    , c (m02ucr_01a4$coef[1], m02ucr_01a4$ci[3,], m02ucr_01a4$pv[3], m02ucr_01a4$bws[1,1], m02ucr_01a4$Nh)
    
    # legislator afterwards
    , c (m02gov_02a4$coef[1], m02gov_02a4$ci[3,], m02gov_02a4$pv[3], m02gov_02a4$bws[1,1], m02gov_02a4$Nh)
    , c (m02pj_02a4$coef[1], m02pj_02a4$ci[3,], m02pj_02a4$pv[3], m02pj_02a4$bws[1,1], m02pj_02a4$Nh)
    , c (m02ucr_02a4$coef[1], m02ucr_02a4$ci[3,], m02ucr_02a4$pv[3], m02ucr_02a4$bws[1,1], m02ucr_02a4$Nh)
    
    # executive afterwards
    , c (m02gov_03a4$coef[1], m02gov_03a4$ci[3,], m02gov_03a4$pv[3], m02gov_03a4$bws[1,1], m02gov_03a4$Nh)
    , c (m02pj_03a4$coef[1], m02pj_03a4$ci[3,], m02pj_03a4$pv[3], m02pj_03a4$bws[1,1], m02pj_03a4$Nh)
    , c (m02ucr_03a4$coef[1], m02ucr_03a4$ci[3,], m02ucr_03a4$pv[3], m02ucr_03a4$bws[1,1], m02ucr_03a4$Nh)
    
    # any position afterwards
    , c (m02gov_05a4$coef[1], m02gov_05a4$ci[3,], m02gov_05a4$pv[3], m02gov_05a4$bws[1,1], m02gov_05a4$Nh)
    , c (m02pj_05a4$coef[1], m02pj_05a4$ci[3,], m02pj_05a4$pv[3], m02pj_05a4$bws[1,1], m02pj_05a4$Nh)
    , c (m02ucr_05a4$coef[1], m02ucr_05a4$ci[3,], m02ucr_05a4$pv[3], m02ucr_05a4$bws[1,1], m02ucr_05a4$Nh)
    
    # terms served afterwards
    , c (m02gov_06a4$coef[1], m02gov_06a4$ci[3,], m02gov_06a4$pv[3], m02gov_06a4$bws[1,1], m02gov_06a4$Nh)
    , c (m02pj_06a4$coef[1], m02pj_06a4$ci[3,], m02pj_06a4$pv[3], m02pj_06a4$bws[1,1], m02pj_06a4$Nh)
    , c (m02ucr_06a4$coef[1], m02ucr_06a4$ci[3,], m02ucr_06a4$pv[3], m02ucr_06a4$bws[1,1], m02ucr_06a4$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01d4$coef[1], m02gov_01d4$ci[3,], m02gov_01d4$pv[3], m02gov_01d4$bws[1,1], m02gov_01d4$Nh)
    , c (m02pj_01d4$coef[1], m02pj_01d4$ci[3,], m02pj_01d4$pv[3], m02pj_01d4$bws[1,1], m02pj_01d4$Nh)
    , c (m02ucr_01d4$coef[1], m02ucr_01d4$ci[3,], m02ucr_01d4$pv[3], m02ucr_01d4$bws[1,1], m02ucr_01d4$Nh)
    
    # legislator afterwards
    , c (m02gov_02d4$coef[1], m02gov_02d4$ci[3,], m02gov_02d4$pv[3], m02gov_02d4$bws[1,1], m02gov_02d4$Nh)
    , c (m02pj_02d4$coef[1], m02pj_02d4$ci[3,], m02pj_02d4$pv[3], m02pj_02d4$bws[1,1], m02pj_02d4$Nh)
    , c (m02ucr_02d4$coef[1], m02ucr_02d4$ci[3,], m02ucr_02d4$pv[3], m02ucr_02d4$bws[1,1], m02ucr_02d4$Nh)
    
    # executive afterwards
    , c (m02gov_03d4$coef[1], m02gov_03d4$ci[3,], m02gov_03d4$pv[3], m02gov_03d4$bws[1,1], m02gov_03d4$Nh)
    , c (m02pj_03d4$coef[1], m02pj_03d4$ci[3,], m02pj_03d4$pv[3], m02pj_03d4$bws[1,1], m02pj_03d4$Nh)
    , c (m02ucr_03d4$coef[1], m02ucr_03d4$ci[3,], m02ucr_03d4$pv[3], m02ucr_03d4$bws[1,1], m02ucr_03d4$Nh)
    
    # any position afterwards
    , c (m02gov_05d4$coef[1], m02gov_05d4$ci[3,], m02gov_05d4$pv[3], m02gov_05d4$bws[1,1], m02gov_05d4$Nh)
    , c (m02pj_05d4$coef[1], m02pj_05d4$ci[3,], m02pj_05d4$pv[3], m02pj_05d4$bws[1,1], m02pj_05d4$Nh)
    , c (m02ucr_05d4$coef[1], m02ucr_05d4$ci[3,], m02ucr_05d4$pv[3], m02ucr_05d4$bws[1,1], m02ucr_05d4$Nh)
    
    # terms served afterwards
    , c (m02gov_06d4$coef[1], m02gov_06d4$ci[3,], m02gov_06d4$pv[3], m02gov_06d4$bws[1,1], m02gov_06d4$Nh)
    , c (m02pj_06d4$coef[1], m02pj_06d4$ci[3,], m02pj_06d4$pv[3], m02pj_06d4$bws[1,1], m02pj_06d4$Nh)
    , c (m02ucr_06d4$coef[1], m02ucr_06d4$ci[3,], m02ucr_06d4$pv[3], m02ucr_06d4$bws[1,1], m02ucr_06d4$Nh)
  )))
(tabMain01b <- cbind (
  sprintf ("%.2f", tabMain01a[,1])
  , paste ("[", sprintf ("%.2f", tabMain01a[,2]), ":", sprintf ("%.2f", tabMain01a[,3]), "]", sep="")
  , sprintf ("%.2f", tabMain01a[,4])
  , sprintf ("%.2f", tabMain01a[,5])
  , paste (sprintf ("%.0f", tabMain01a[,6]), "$|$", sprintf ("%.0f", tabMain01a[,7]), sep="")
  , rep ("", nrow (tabMain01a))
  , sprintf ("%.2f", tabMain01a[,8])
  , paste ("[", sprintf ("%.2f", tabMain01a[,9]), ":", sprintf ("%.2f", tabMain01a[,10]), "]", sep="")
  , sprintf ("%.2f", tabMain01a[,11])
  , sprintf ("%.2f", tabMain01a[,12])
  , paste (sprintf ("%.0f", tabMain01a[,13]), "$|$", sprintf ("%.0f", tabMain01a[,14]), sep="")))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 5)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{renomination} (0/1)} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header4 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$pos[[4]] <- 6
addtorow$pos[[5]] <- 9
addtorow$pos[[6]] <- 12
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6)
print (xtable (  cbind (rows, tabMain01b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="The effect of a legislative seat on a politician's career in Argentina, 1983-2011"
                 , label="T:main")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top"
       , latex.environments="center"
       , size="small"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="Table02.tex")


### Table A1 (descriptive statistics)

## Sample sizes
c (nrow (base.g[base.g$running < 0,]), nrow (base.g[base.g$running > 0,]), nrow (base.g))
c (nrow (base.g[base.g$largeProv==0 & base.g$running < 0,]), nrow (base.g[base.g$largeProv==0 & base.g$running > 0,]), nrow (base.g[base.g$largeProv==0,]))
c (nrow (base.p[base.p$running < 0,]), nrow (base.p[base.p$running > 0,]), nrow (base.p))
c (nrow (base.p[base.p$largeProv==0 & base.p$running < 0,]), nrow (base.p[base.p$largeProv==0 & base.p$running > 0,]), nrow (base.p[base.p$largeProv==0,]))
c (nrow (base.r[base.r$running < 0,]), nrow (base.r[base.r$running > 0,]), nrow (base.r))
c (nrow (base.r[base.r$largeProv==0 & base.r$running < 0,]), nrow (base.r[base.r$largeProv==0 & base.r$running > 0,]), nrow (base.r[base.r$largeProv==0,]))

## Proportion of governor's party that corresponds to PJ and UCR, respectively
round (mean (base.g$partyPJ)*100, 1)  ## 64.2%
round (mean (base.g$partyUCR)*100, 1) ## 23.8 %
round ((1 - mean (base.g$partyPJ) - mean (base.g$partyUCR))*100, 1) ## 12.1%

## Main sample(s)
(tabDescriptive01 <- cbind (
  
  ### (a) Governor's party
  with (baseFull[baseFull$incGober==1,], rbind (
    
    ## Outcome variables
    c (mean (renom, na.rm=T), sd (renom, na.rm=T), min (renom, na.rm=T), max (renom, na.rm=T))
    , c (mean (legAfter, na.rm=T), sd (legAfter, na.rm=T), min (legAfter, na.rm=T), max (legAfter, na.rm=T))
    , c (mean (exeAfter, na.rm=T), sd (exeAfter, na.rm=T), min (exeAfter, na.rm=T), max (exeAfter, na.rm=T))
    , c (mean (anyAfter, na.rm=T), sd (anyAfter, na.rm=T), min (anyAfter, na.rm=T), max (anyAfter, na.rm=T))
    , c (mean (valAfter.eq, na.rm=T), sd (valAfter.eq, na.rm=T), min (valAfter.eq, na.rm=T), max (valAfter.eq, na.rm=T))

    ## Explanatory variables
    , c (mean (assumed, na.rm=T), sd (assumed, na.rm=T), min (assumed, na.rm=T), max (assumed, na.rm=T))
    , c (mean (pWeight, na.rm=T), sd (pWeight, na.rm=T), min (pWeight, na.rm=T), max (pWeight, na.rm=T))
    , c (mean (running, na.rm=T), sd (running, na.rm=T), min (running, na.rm=T), max (running, na.rm=T))
    , c (mean (nextIn, na.rm=T), sd (nextIn, na.rm=T), min (nextIn, na.rm=T), max (nextIn, na.rm=T))
    , c (mean (nextOut, na.rm=T), sd (nextOut, na.rm=T), min (nextOut, na.rm=T), max (nextOut, na.rm=T))
    
    ## Previous experience
    , c (mean (legBefore, na.rm=T), sd (legBefore, na.rm=T), min (legBefore, na.rm=T), max (legBefore, na.rm=T))
    , c (mean (exeBefore, na.rm=T), sd (exeBefore, na.rm=T), min (exeBefore, na.rm=T), max (exeBefore, na.rm=T))
    , c (mean (anyBefore, na.rm=T), sd (anyBefore, na.rm=T), min (anyBefore, na.rm=T), max (anyBefore, na.rm=T))
    , c (mean (valBefore.eq, na.rm=T), sd (valBefore.eq, na.rm=T), min (valBefore.eq, na.rm=T), max (valBefore.eq, na.rm=T))
    
    ## Other pre-treatment covariates
    , c (mean (female, na.rm=T), sd (female, na.rm=T), min (female, na.rm=T), max (female, na.rm=T))
    , c (mean (incPresi, na.rm=T), sd (incPresi, na.rm=T), min (incPresi, na.rm=T), max (incPresi, na.rm=T))
    , c (mean (position, na.rm=T), sd (position, na.rm=T), min (position, na.rm=T), max (position, na.rm=T))
    , c (mean (position01, na.rm=T), sd (position01, na.rm=T), min (position01, na.rm=T), max (position01, na.rm=T))
    , c (mean (position02, na.rm=T), sd (position02, na.rm=T), min (position02, na.rm=T), max (position02, na.rm=T))
    , c (mean (position03, na.rm=T), sd (position03, na.rm=T), min (position03, na.rm=T), max (position03, na.rm=T))
    , c (mean (position04, na.rm=T), sd (position04, na.rm=T), min (position04, na.rm=T), max (position04, na.rm=T))
    , c (mean (midterm, na.rm=T), sd (midterm, na.rm=T), min (midterm, na.rm=T), max (midterm, na.rm=T))
    , c (mean (mag, na.rm=T), sd (mag, na.rm=T), min (mag, na.rm=T), max (mag, na.rm=T))
    , c (mean (largeMag2, na.rm=T), sd (largeMag2, na.rm=T), min (largeMag2, na.rm=T), max (largeMag2, na.rm=T))
  ))
  
  
  ### (b) PJ
  , with (baseFull[baseFull$partyPJ==1,], rbind (
    
    ## Outcome variables
    c (mean (renom, na.rm=T), sd (renom, na.rm=T), min (renom, na.rm=T), max (renom, na.rm=T))
    , c (mean (legAfter, na.rm=T), sd (legAfter, na.rm=T), min (legAfter, na.rm=T), max (legAfter, na.rm=T))
    , c (mean (exeAfter, na.rm=T), sd (exeAfter, na.rm=T), min (exeAfter, na.rm=T), max (exeAfter, na.rm=T))
    , c (mean (anyAfter, na.rm=T), sd (anyAfter, na.rm=T), min (anyAfter, na.rm=T), max (anyAfter, na.rm=T))
    , c (mean (valAfter.eq, na.rm=T), sd (valAfter.eq, na.rm=T), min (valAfter.eq, na.rm=T), max (valAfter.eq, na.rm=T))
    
    ## Explanatory variables
    , c (mean (assumed, na.rm=T), sd (assumed, na.rm=T), min (assumed, na.rm=T), max (assumed, na.rm=T))
    , c (mean (pWeight, na.rm=T), sd (pWeight, na.rm=T), min (pWeight, na.rm=T), max (pWeight, na.rm=T))
    , c (mean (running, na.rm=T), sd (running, na.rm=T), min (running, na.rm=T), max (running, na.rm=T))
    , c (mean (nextIn, na.rm=T), sd (nextIn, na.rm=T), min (nextIn, na.rm=T), max (nextIn, na.rm=T))
    , c (mean (nextOut, na.rm=T), sd (nextOut, na.rm=T), min (nextOut, na.rm=T), max (nextOut, na.rm=T))
    
    ## Previous experience
    , c (mean (legBefore, na.rm=T), sd (legBefore, na.rm=T), min (legBefore, na.rm=T), max (legBefore, na.rm=T))
    , c (mean (exeBefore, na.rm=T), sd (exeBefore, na.rm=T), min (exeBefore, na.rm=T), max (exeBefore, na.rm=T))
    , c (mean (anyBefore, na.rm=T), sd (anyBefore, na.rm=T), min (anyBefore, na.rm=T), max (anyBefore, na.rm=T))
    , c (mean (valBefore.eq, na.rm=T), sd (valBefore.eq, na.rm=T), min (valBefore.eq, na.rm=T), max (valBefore.eq, na.rm=T))
    
    ## Other pre-treatment covariates
    , c (mean (female, na.rm=T), sd (female, na.rm=T), min (female, na.rm=T), max (female, na.rm=T))
    , c (mean (incPresi, na.rm=T), sd (incPresi, na.rm=T), min (incPresi, na.rm=T), max (incPresi, na.rm=T))
    , c (mean (position, na.rm=T), sd (position, na.rm=T), min (position, na.rm=T), max (position, na.rm=T))
    , c (mean (position01, na.rm=T), sd (position01, na.rm=T), min (position01, na.rm=T), max (position01, na.rm=T))
    , c (mean (position02, na.rm=T), sd (position02, na.rm=T), min (position02, na.rm=T), max (position02, na.rm=T))
    , c (mean (position03, na.rm=T), sd (position03, na.rm=T), min (position03, na.rm=T), max (position03, na.rm=T))
    , c (mean (position04, na.rm=T), sd (position04, na.rm=T), min (position04, na.rm=T), max (position04, na.rm=T))
    , c (mean (midterm, na.rm=T), sd (midterm, na.rm=T), min (midterm, na.rm=T), max (midterm, na.rm=T))
    , c (mean (mag, na.rm=T), sd (mag, na.rm=T), min (mag, na.rm=T), max (mag, na.rm=T))
    , c (mean (largeMag2, na.rm=T), sd (largeMag2, na.rm=T), min (largeMag2, na.rm=T), max (largeMag2, na.rm=T))
  ))
  
  
  ### (c) UCR
  , with (baseFull[baseFull$partyUCR==1,], rbind (
    
    ## Outcome variables
    c (mean (renom, na.rm=T), sd (renom, na.rm=T), min (renom, na.rm=T), max (renom, na.rm=T))
    , c (mean (legAfter, na.rm=T), sd (legAfter, na.rm=T), min (legAfter, na.rm=T), max (legAfter, na.rm=T))
    , c (mean (exeAfter, na.rm=T), sd (exeAfter, na.rm=T), min (exeAfter, na.rm=T), max (exeAfter, na.rm=T))
    , c (mean (anyAfter, na.rm=T), sd (anyAfter, na.rm=T), min (anyAfter, na.rm=T), max (anyAfter, na.rm=T))
    , c (mean (valAfter.eq, na.rm=T), sd (valAfter.eq, na.rm=T), min (valAfter.eq, na.rm=T), max (valAfter.eq, na.rm=T))
    
    ## Explanatory variables
    , c (mean (assumed, na.rm=T), sd (assumed, na.rm=T), min (assumed, na.rm=T), max (assumed, na.rm=T))
    , c (mean (pWeight, na.rm=T), sd (pWeight, na.rm=T), min (pWeight, na.rm=T), max (pWeight, na.rm=T))
    , c (mean (running, na.rm=T), sd (running, na.rm=T), min (running, na.rm=T), max (running, na.rm=T))
    , c (mean (nextIn, na.rm=T), sd (nextIn, na.rm=T), min (nextIn, na.rm=T), max (nextIn, na.rm=T))
    , c (mean (nextOut, na.rm=T), sd (nextOut, na.rm=T), min (nextOut, na.rm=T), max (nextOut, na.rm=T))
    
    ## Previous experience
    , c (mean (legBefore, na.rm=T), sd (legBefore, na.rm=T), min (legBefore, na.rm=T), max (legBefore, na.rm=T))
    , c (mean (exeBefore, na.rm=T), sd (exeBefore, na.rm=T), min (exeBefore, na.rm=T), max (exeBefore, na.rm=T))
    , c (mean (anyBefore, na.rm=T), sd (anyBefore, na.rm=T), min (anyBefore, na.rm=T), max (anyBefore, na.rm=T))
    , c (mean (valBefore.eq, na.rm=T), sd (valBefore.eq, na.rm=T), min (valBefore.eq, na.rm=T), max (valBefore.eq, na.rm=T))
    
    ## Other pre-treatment covariates
    , c (mean (female, na.rm=T), sd (female, na.rm=T), min (female, na.rm=T), max (female, na.rm=T))
    , c (mean (incPresi, na.rm=T), sd (incPresi, na.rm=T), min (incPresi, na.rm=T), max (incPresi, na.rm=T))
    , c (mean (position, na.rm=T), sd (position, na.rm=T), min (position, na.rm=T), max (position, na.rm=T))
    , c (mean (position01, na.rm=T), sd (position01, na.rm=T), min (position01, na.rm=T), max (position01, na.rm=T))
    , c (mean (position02, na.rm=T), sd (position02, na.rm=T), min (position02, na.rm=T), max (position02, na.rm=T))
    , c (mean (position03, na.rm=T), sd (position03, na.rm=T), min (position03, na.rm=T), max (position03, na.rm=T))
    , c (mean (position04, na.rm=T), sd (position04, na.rm=T), min (position04, na.rm=T), max (position04, na.rm=T))
    , c (mean (midterm, na.rm=T), sd (midterm, na.rm=T), min (midterm, na.rm=T), max (midterm, na.rm=T))
    , c (mean (mag, na.rm=T), sd (mag, na.rm=T), min (mag, na.rm=T), max (mag, na.rm=T))
    , c (mean (largeMag2, na.rm=T), sd (largeMag2, na.rm=T), min (largeMag2, na.rm=T), max (largeMag2, na.rm=T))))))

## Marginal candidates sample(s)
(tabDescriptive02 <- cbind (
  
  ### (a) Governor's party
  with (base.g, rbind (
    
    ## Outcome variables
    c (mean (renom, na.rm=T), sd (renom, na.rm=T), min (renom, na.rm=T), max (renom, na.rm=T))
    , c (mean (legAfter, na.rm=T), sd (legAfter, na.rm=T), min (legAfter, na.rm=T), max (legAfter, na.rm=T))
    , c (mean (exeAfter, na.rm=T), sd (exeAfter, na.rm=T), min (exeAfter, na.rm=T), max (exeAfter, na.rm=T))
    , c (mean (anyAfter, na.rm=T), sd (anyAfter, na.rm=T), min (anyAfter, na.rm=T), max (anyAfter, na.rm=T))
    , c (mean (valAfter.eq, na.rm=T), sd (valAfter.eq, na.rm=T), min (valAfter.eq, na.rm=T), max (valAfter.eq, na.rm=T))
    
    ## Explanatory variables
    , c (mean (assumed, na.rm=T), sd (assumed, na.rm=T), min (assumed, na.rm=T), max (assumed, na.rm=T))
    , c (mean (pWeight, na.rm=T), sd (pWeight, na.rm=T), min (pWeight, na.rm=T), max (pWeight, na.rm=T))
    , c (mean (running, na.rm=T), sd (running, na.rm=T), min (running, na.rm=T), max (running, na.rm=T))
    , c (mean (nextIn, na.rm=T), sd (nextIn, na.rm=T), min (nextIn, na.rm=T), max (nextIn, na.rm=T))
    , c (mean (nextOut, na.rm=T), sd (nextOut, na.rm=T), min (nextOut, na.rm=T), max (nextOut, na.rm=T))
    
    ## Previous experience
    , c (mean (legBefore, na.rm=T), sd (legBefore, na.rm=T), min (legBefore, na.rm=T), max (legBefore, na.rm=T))
    , c (mean (exeBefore, na.rm=T), sd (exeBefore, na.rm=T), min (exeBefore, na.rm=T), max (exeBefore, na.rm=T))
    , c (mean (anyBefore, na.rm=T), sd (anyBefore, na.rm=T), min (anyBefore, na.rm=T), max (anyBefore, na.rm=T))
    , c (mean (valBefore.eq, na.rm=T), sd (valBefore.eq, na.rm=T), min (valBefore.eq, na.rm=T), max (valBefore.eq, na.rm=T))
    
    ## Other pre-treatment covariates
    , c (mean (female, na.rm=T), sd (female, na.rm=T), min (female, na.rm=T), max (female, na.rm=T))
    , c (mean (incPresi, na.rm=T), sd (incPresi, na.rm=T), min (incPresi, na.rm=T), max (incPresi, na.rm=T))
    , c (mean (position, na.rm=T), sd (position, na.rm=T), min (position, na.rm=T), max (position, na.rm=T))
    , c (mean (position01, na.rm=T), sd (position01, na.rm=T), min (position01, na.rm=T), max (position01, na.rm=T))
    , c (mean (position02, na.rm=T), sd (position02, na.rm=T), min (position02, na.rm=T), max (position02, na.rm=T))
    , c (mean (position03, na.rm=T), sd (position03, na.rm=T), min (position03, na.rm=T), max (position03, na.rm=T))
    , c (mean (position04, na.rm=T), sd (position04, na.rm=T), min (position04, na.rm=T), max (position04, na.rm=T))
    , c (mean (midterm, na.rm=T), sd (midterm, na.rm=T), min (midterm, na.rm=T), max (midterm, na.rm=T))
    , c (mean (mag, na.rm=T), sd (mag, na.rm=T), min (mag, na.rm=T), max (mag, na.rm=T))
    , c (mean (largeMag2, na.rm=T), sd (largeMag2, na.rm=T), min (largeMag2, na.rm=T), max (largeMag2, na.rm=T))
  ))
  
  
  ### (b) PJ
  , with (base.p, rbind (
    
    ## Outcome variables
    c (mean (renom, na.rm=T), sd (renom, na.rm=T), min (renom, na.rm=T), max (renom, na.rm=T))
    , c (mean (legAfter, na.rm=T), sd (legAfter, na.rm=T), min (legAfter, na.rm=T), max (legAfter, na.rm=T))
    , c (mean (exeAfter, na.rm=T), sd (exeAfter, na.rm=T), min (exeAfter, na.rm=T), max (exeAfter, na.rm=T))
    , c (mean (anyAfter, na.rm=T), sd (anyAfter, na.rm=T), min (anyAfter, na.rm=T), max (anyAfter, na.rm=T))
    , c (mean (valAfter.eq, na.rm=T), sd (valAfter.eq, na.rm=T), min (valAfter.eq, na.rm=T), max (valAfter.eq, na.rm=T))
    
    ## Explanatory variables
    , c (mean (assumed, na.rm=T), sd (assumed, na.rm=T), min (assumed, na.rm=T), max (assumed, na.rm=T))
    , c (mean (pWeight, na.rm=T), sd (pWeight, na.rm=T), min (pWeight, na.rm=T), max (pWeight, na.rm=T))
    , c (mean (running, na.rm=T), sd (running, na.rm=T), min (running, na.rm=T), max (running, na.rm=T))
    , c (mean (nextIn, na.rm=T), sd (nextIn, na.rm=T), min (nextIn, na.rm=T), max (nextIn, na.rm=T))
    , c (mean (nextOut, na.rm=T), sd (nextOut, na.rm=T), min (nextOut, na.rm=T), max (nextOut, na.rm=T))
    
    ## Previous experience
    , c (mean (legBefore, na.rm=T), sd (legBefore, na.rm=T), min (legBefore, na.rm=T), max (legBefore, na.rm=T))
    , c (mean (exeBefore, na.rm=T), sd (exeBefore, na.rm=T), min (exeBefore, na.rm=T), max (exeBefore, na.rm=T))
    , c (mean (anyBefore, na.rm=T), sd (anyBefore, na.rm=T), min (anyBefore, na.rm=T), max (anyBefore, na.rm=T))
    , c (mean (valBefore.eq, na.rm=T), sd (valBefore.eq, na.rm=T), min (valBefore.eq, na.rm=T), max (valBefore.eq, na.rm=T))
    
    ## Other pre-treatment covariates
    , c (mean (female, na.rm=T), sd (female, na.rm=T), min (female, na.rm=T), max (female, na.rm=T))
    , c (mean (incPresi, na.rm=T), sd (incPresi, na.rm=T), min (incPresi, na.rm=T), max (incPresi, na.rm=T))
    , c (mean (position, na.rm=T), sd (position, na.rm=T), min (position, na.rm=T), max (position, na.rm=T))
    , c (mean (position01, na.rm=T), sd (position01, na.rm=T), min (position01, na.rm=T), max (position01, na.rm=T))
    , c (mean (position02, na.rm=T), sd (position02, na.rm=T), min (position02, na.rm=T), max (position02, na.rm=T))
    , c (mean (position03, na.rm=T), sd (position03, na.rm=T), min (position03, na.rm=T), max (position03, na.rm=T))
    , c (mean (position04, na.rm=T), sd (position04, na.rm=T), min (position04, na.rm=T), max (position04, na.rm=T))
    , c (mean (midterm, na.rm=T), sd (midterm, na.rm=T), min (midterm, na.rm=T), max (midterm, na.rm=T))
    , c (mean (mag, na.rm=T), sd (mag, na.rm=T), min (mag, na.rm=T), max (mag, na.rm=T))
    , c (mean (largeMag2, na.rm=T), sd (largeMag2, na.rm=T), min (largeMag2, na.rm=T), max (largeMag2, na.rm=T))
  ))
  
  
  ### (c) UCR
  , with (base.r, rbind (
    
    ## Outcome variables
    c (mean (renom, na.rm=T), sd (renom, na.rm=T), min (renom, na.rm=T), max (renom, na.rm=T))
    , c (mean (legAfter, na.rm=T), sd (legAfter, na.rm=T), min (legAfter, na.rm=T), max (legAfter, na.rm=T))
    , c (mean (exeAfter, na.rm=T), sd (exeAfter, na.rm=T), min (exeAfter, na.rm=T), max (exeAfter, na.rm=T))
    , c (mean (anyAfter, na.rm=T), sd (anyAfter, na.rm=T), min (anyAfter, na.rm=T), max (anyAfter, na.rm=T))
    , c (mean (valAfter.eq, na.rm=T), sd (valAfter.eq, na.rm=T), min (valAfter.eq, na.rm=T), max (valAfter.eq, na.rm=T))
    
    ## Explanatory variables
    , c (mean (assumed, na.rm=T), sd (assumed, na.rm=T), min (assumed, na.rm=T), max (assumed, na.rm=T))
    , c (mean (pWeight, na.rm=T), sd (pWeight, na.rm=T), min (pWeight, na.rm=T), max (pWeight, na.rm=T))
    , c (mean (running, na.rm=T), sd (running, na.rm=T), min (running, na.rm=T), max (running, na.rm=T))
    , c (mean (nextIn, na.rm=T), sd (nextIn, na.rm=T), min (nextIn, na.rm=T), max (nextIn, na.rm=T))
    , c (mean (nextOut, na.rm=T), sd (nextOut, na.rm=T), min (nextOut, na.rm=T), max (nextOut, na.rm=T))
    
    ## Previous experience
    , c (mean (legBefore, na.rm=T), sd (legBefore, na.rm=T), min (legBefore, na.rm=T), max (legBefore, na.rm=T))
    , c (mean (exeBefore, na.rm=T), sd (exeBefore, na.rm=T), min (exeBefore, na.rm=T), max (exeBefore, na.rm=T))
    , c (mean (anyBefore, na.rm=T), sd (anyBefore, na.rm=T), min (anyBefore, na.rm=T), max (anyBefore, na.rm=T))
    , c (mean (valBefore.eq, na.rm=T), sd (valBefore.eq, na.rm=T), min (valBefore.eq, na.rm=T), max (valBefore.eq, na.rm=T))
    
    ## Other pre-treatment covariates
    , c (mean (female, na.rm=T), sd (female, na.rm=T), min (female, na.rm=T), max (female, na.rm=T))
    , c (mean (incPresi, na.rm=T), sd (incPresi, na.rm=T), min (incPresi, na.rm=T), max (incPresi, na.rm=T))
    , c (mean (position, na.rm=T), sd (position, na.rm=T), min (position, na.rm=T), max (position, na.rm=T))
    , c (mean (position01, na.rm=T), sd (position01, na.rm=T), min (position01, na.rm=T), max (position01, na.rm=T))
    , c (mean (position02, na.rm=T), sd (position02, na.rm=T), min (position02, na.rm=T), max (position02, na.rm=T))
    , c (mean (position03, na.rm=T), sd (position03, na.rm=T), min (position03, na.rm=T), max (position03, na.rm=T))
    , c (mean (position04, na.rm=T), sd (position04, na.rm=T), min (position04, na.rm=T), max (position04, na.rm=T))
    , c (mean (midterm, na.rm=T), sd (midterm, na.rm=T), min (midterm, na.rm=T), max (midterm, na.rm=T))
    , c (mean (mag, na.rm=T), sd (mag, na.rm=T), min (mag, na.rm=T), max (mag, na.rm=T))
    , c (mean (largeMag2, na.rm=T), sd (largeMag2, na.rm=T), min (largeMag2, na.rm=T), max (largeMag2, na.rm=T))
  ))))
tabDescriptive <- rbind (tabDescriptive01, tabDescriptive02)
tabDescriptive <- cbind (tabDescriptive[,1:4], rep (NA, nrow (tabDescriptive)), tabDescriptive[,5:8], rep (NA, nrow (tabDescriptive)), tabDescriptive[,9:12])

rows <- rep ( c (
  
  ## outcome variable(s)
  "\\emph{renomination} (0/1)"
  , "\\emph{legislator (after)} (0/1)"
  , "\\emph{executive (after)} (0/1)"
  , "\\emph{any office (after)} (0/1)"
  , "\\emph{terms served (after)} (0/1)"
  
  ## explanatory and forcing variables
  , "[1ex] \\emph{assumed office} (0/1)"
  , "\\emph{time served}"
  , "\\emph{vote change to last seat}"
  , "\\emph{bare winner} (0/1)"
  , "\\emph{bare loser} (0/1)"
  
  ## previous experience
  , "[1ex] \\emph{legislator (before)} (0/1)"
  , "\\emph{executive (before)} (0/1)"
  , "\\emph{any office (before)} (0/1)"
  , "\\emph{terms served (before)}"
  
  ## other pre-treatment characteristics
  , "[1ex] \\emph{female} (0/1)"
  , "\\emph{president's party} (0/1)"
  , "\\emph{position in list}"
  , "\\emph{position in list: \\#1} (0/1)"
  , "\\emph{position in list: \\#2} (0/1)"
  , "\\emph{position in list: \\#3} (0/1)"
  , "\\emph{position in list: \\#4} (0/1)"
  , "\\emph{midterm election} (0/1)"
  , "\\emph{district magnitude}"
  , "\\emph{large magnitude} (0/1)"), 2)

Header1 <- paste ("\\toprule & \\multicolumn{4}{c}{Governor's party candidates} & & \\multicolumn{4}{c}{\\textsc{pj} candidates} & & \\multicolumn{4}{c}{\\textsc{ucr} candidates} \\\\ \n")
Header2 <- paste ("& \\multicolumn{4}{c}{($\\textsc{n} = ", sprintf ("%.0f", nrow (filter (baseFull, incGober==1))), "$)} & & \\multicolumn{4}{c}{($\\textsc{n} = ", sprintf ("%.0f", nrow (filter (baseFull, partyPJ==1))), "$)} & & \\multicolumn{4}{c}{($\\textsc{n} = ", sprintf ("%.0f", nrow (filter (baseFull, partyUCR==1))), "$)} \\\\ \\cmidrule{2-5} \\cmidrule{7-10} \\cmidrule{12-15} \n")
Header3 <- paste ("\\multicolumn{1}{l}{(a) Full sample(s)} & \\multicolumn{1}{c}{mean} & \\multicolumn{1}{c}{sd.} & \\multicolumn{1}{c}{min} & \\multicolumn{1}{c}{max} & & \\multicolumn{1}{c}{mean} & \\multicolumn{1}{c}{sd.} & \\multicolumn{1}{c}{min} & \\multicolumn{1}{c}{max} & & \\multicolumn{1}{c}{mean} & \\multicolumn{1}{c}{sd.} & \\multicolumn{1}{c}{min} & \\multicolumn{1}{c}{max} \\\\ \\midrule \n")
Header4 <- paste ("[1.5ex] \\multicolumn{1}{l}{(b) Marginal candidates} & \\multicolumn{4}{c}{($\\textsc{n} = ", sprintf ("%.0f", nrow (base.g)), "$)} & & \\multicolumn{4}{c}{($\\textsc{n} = ", sprintf ("%.0f", nrow (base.p)), "$)} & & \\multicolumn{4}{c}{($\\textsc{n} = ", sprintf ("%.0f", nrow (base.r)), "$)} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 0
addtorow$pos[[4]] <- 24
addtorow$command <- c (Header1, Header2, Header3, Header4)
print (xtable (  cbind (rows, round (tabDescriptive, n.digit))
                 , align=c("l","l","r","r","r","r","r","r","r","r","r","r","r","r","r","r")
                 , digits=2
                 , caption="{Descriptive statistics}"
                 , label="T:descriptive")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="scriptsize"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA01.tex")


### Table A2 (compliance)

(tabComp01a <- cbind (
  
  ## all provinces
  rbind (
    
    # assumed at all (0/1)
    c (m01gov_01a4$coef[1], m01gov_01a4$ci[3,], m01gov_01a4$pv[3], m01gov_01a4$bws[1,1], m01gov_01a4$Nh)
    , c (m01pj_01a4$coef[1], m01pj_01a4$ci[3,], m01pj_01a4$pv[3], m01pj_01a4$bws[1,1], m01pj_01a4$Nh)
    , c (m01ucr_01a4$coef[1], m01ucr_01a4$ci[3,], m01ucr_01a4$pv[3], m01ucr_01a4$bws[1,1], m01ucr_01a4$Nh)
    
    # time effectively served
    , c (m01gov_02a4$coef[1], m01gov_02a4$ci[3,], m01gov_02a4$pv[3], m01gov_02a4$bws[1,1], m01gov_02a4$Nh)
    , c (m01pj_02a4$coef[1], m01pj_02a4$ci[3,], m01pj_02a4$pv[3], m01pj_02a4$bws[1,1], m01pj_02a4$Nh)
    , c (m01ucr_02a4$coef[1], m01ucr_02a4$ci[3,], m01ucr_02a4$pv[3], m01ucr_02a4$bws[1,1], m01ucr_02a4$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # assumed at all (0/1)
    c (m01gov_01d4$coef[1], m01gov_01d4$ci[3,], m01gov_01d4$pv[3], m01gov_01d4$bws[1,1], m01gov_01d4$Nh)
    , c (m01pj_01d4$coef[1], m01pj_01d4$ci[3,], m01pj_01d4$pv[3], m01pj_01d4$bws[1,1], m01pj_01d4$Nh)
    , c (m01ucr_01d4$coef[1], m01ucr_01d4$ci[3,], m01ucr_01d4$pv[3], m01ucr_01d4$bws[1,1], m01ucr_01d4$Nh)
    
    # time effectively served
    , c (m01gov_02d4$coef[1], m01gov_02d4$ci[3,], m01gov_02d4$pv[3], m01gov_02d4$bws[1,1], m01gov_02d4$Nh)
    , c (m01pj_02d4$coef[1], m01pj_02d4$ci[3,], m01pj_02d4$pv[3], m01pj_02d4$bws[1,1], m01pj_02d4$Nh)
    , c (m01ucr_02d4$coef[1], m01ucr_02d4$ci[3,], m01ucr_02d4$pv[3], m01ucr_02d4$bws[1,1], m01ucr_02d4$Nh))))
(tabComp01b <- cbind (
  sprintf ("%.2f", tabComp01a[,1])
  , paste ("[", sprintf ("%.2f", tabComp01a[,2]), ":", sprintf ("%.2f", tabComp01a[,3]), "]", sep="")
  , sprintf ("%.2f", tabComp01a[,4])
  , sprintf ("%.2f", tabComp01a[,5])
  , paste (sprintf ("%.0f", tabComp01a[,6]), "$|$", sprintf ("%.0f", tabComp01a[,7]), sep="")
  , rep ("", nrow (tabComp01a))
  , sprintf ("%.2f", tabComp01a[,8])
  , paste ("[", sprintf ("%.2f", tabComp01a[,9]), ":", sprintf ("%.2f", tabComp01a[,10]), "]", sep="")
  , sprintf ("%.2f", tabComp01a[,11])
  , sprintf ("%.2f", tabComp01a[,12])
  , paste (sprintf ("%.0f", tabComp01a[,13]), "$|$", sprintf ("%.0f", tabComp01a[,14]), sep="")))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 2)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{assumed office} (0/1)} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{time served}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$command <- c (Header1, Header2, Header3)
print (xtable (  cbind (rows, tabComp01b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="Compliance with treatment assignment"
                 , label="T:compliance")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="small"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA02.tex")


### Table A3
(tabBal01a <- cbind (
  
  ## all provinces
  rbind (
    
    # position in party list
    c (m04gov_07a4$coef[1], m04gov_07a4$ci[3,], m04gov_07a4$pv[3], m04gov_07a4$bws[1,1], m04gov_07a4$Nh)
    , c (m04pj_07a4$coef[1], m04pj_07a4$ci[3,], m04pj_07a4$pv[3], m04pj_07a4$bws[1,1], m04pj_07a4$Nh)
    , c (m04ucr_07a4$coef[1], m04ucr_07a4$ci[3,], m04ucr_07a4$pv[3], m04ucr_07a4$bws[1,1], m04ucr_07a4$Nh)
    
    # legislator before
    , c (m04gov_01a4$coef[1], m04gov_01a4$ci[3,], m04gov_01a4$pv[3], m04gov_01a4$bws[1,1], m04gov_01a4$Nh)
    , c (m04pj_01a4$coef[1], m04pj_01a4$ci[3,], m04pj_01a4$pv[3], m04pj_01a4$bws[1,1], m04pj_01a4$Nh)
    , c (m04ucr_01a4$coef[1], m04ucr_01a4$ci[3,], m04ucr_01a4$pv[3], m04ucr_01a4$bws[1,1], m04ucr_01a4$Nh)
    
    # executive before
    , c (m04gov_02a4$coef[1], m04gov_02a4$ci[3,], m04gov_02a4$pv[3], m04gov_02a4$bws[1,1], m04gov_02a4$Nh)
    , c (m04pj_02a4$coef[1], m04pj_02a4$ci[3,], m04pj_02a4$pv[3], m04pj_02a4$bws[1,1], m04pj_02a4$Nh)
    , c (m04ucr_02a4$coef[1], m04ucr_02a4$ci[3,], m04ucr_02a4$pv[3], m04ucr_02a4$bws[1,1], m04ucr_02a4$Nh)
    
    # any position before
    , c (m04gov_03a4$coef[1], m04gov_03a4$ci[3,], m04gov_03a4$pv[3], m04gov_03a4$bws[1,1], m04gov_03a4$Nh)
    , c (m04pj_03a4$coef[1], m04pj_03a4$ci[3,], m04pj_03a4$pv[3], m04pj_03a4$bws[1,1], m04pj_03a4$Nh)
    , c (m04ucr_03a4$coef[1], m04ucr_03a4$ci[3,], m04ucr_03a4$pv[3], m04ucr_03a4$bws[1,1], m04ucr_03a4$Nh)
    
    # terms served before
    , c (m04gov_04a4$coef[1], m04gov_04a4$ci[3,], m04gov_04a4$pv[3], m04gov_04a4$bws[1,1], m04gov_04a4$Nh)
    , c (m04pj_04a4$coef[1], m04pj_04a4$ci[3,], m04pj_04a4$pv[3], m04pj_04a4$bws[1,1], m04pj_04a4$Nh)
    , c (m04ucr_04a4$coef[1], m04ucr_04a4$ci[3,], m04ucr_04a4$pv[3], m04ucr_04a4$bws[1,1], m04ucr_04a4$Nh)
    
    # female
    , c (m04gov_05a4$coef[1], m04gov_05a4$ci[3,], m04gov_05a4$pv[3], m04gov_05a4$bws[1,1], m04gov_05a4$Nh)
    , c (m04pj_05a4$coef[1], m04pj_05a4$ci[3,], m04pj_05a4$pv[3], m04pj_05a4$bws[1,1], m04pj_05a4$Nh)
    , c (m04ucr_05a4$coef[1], m04ucr_05a4$ci[3,], m04ucr_05a4$pv[3], m04ucr_05a4$bws[1,1], m04ucr_05a4$Nh)
    
    # president's party
    , c (m04gov_06a4$coef[1], m04gov_06a4$ci[3,], m04gov_06a4$pv[3], m04gov_06a4$bws[1,1], m04gov_06a4$Nh)
    , c (m04pj_06a4$coef[1], m04pj_06a4$ci[3,], m04pj_06a4$pv[3], m04pj_06a4$bws[1,1], m04pj_06a4$Nh)
    , c (m04ucr_06a4$coef[1], m04ucr_06a4$ci[3,], m04ucr_06a4$pv[3], m04ucr_06a4$bws[1,1], m04ucr_06a4$Nh)
    
    # midterm election
    , c (m04gov_08a4$coef[1], m04gov_08a4$ci[3,], m04gov_08a4$pv[3], m04gov_08a4$bws[1,1], m04gov_08a4$Nh)
    , c (m04pj_08a4$coef[1], m04pj_08a4$ci[3,], m04pj_08a4$pv[3], m04pj_08a4$bws[1,1], m04pj_08a4$Nh)
    , c (m04ucr_08a4$coef[1], m04ucr_08a4$ci[3,], m04ucr_08a4$pv[3], m04ucr_08a4$bws[1,1], m04ucr_08a4$Nh)
    
    # district magnitude (log)
    , c (m04gov_09a4$coef[1], m04gov_09a4$ci[3,], m04gov_09a4$pv[3], m04gov_09a4$bws[1,1], m04gov_09a4$Nh)
    , c (m04pj_09a4$coef[1], m04pj_09a4$ci[3,], m04pj_09a4$pv[3], m04pj_09a4$bws[1,1], m04pj_09a4$Nh)
    , c (m04ucr_09a4$coef[1], m04ucr_09a4$ci[3,], m04ucr_09a4$pv[3], m04ucr_09a4$bws[1,1], m04ucr_09a4$Nh)
    
    # large magnitude election
    , c (m04gov_10a4$coef[1], m04gov_10a4$ci[3,], m04gov_10a4$pv[3], m04gov_10a4$bws[1,1], m04gov_10a4$Nh)
    , c (m04pj_10a4$coef[1], m04pj_10a4$ci[3,], m04pj_10a4$pv[3], m04pj_10a4$bws[1,1], m04pj_10a4$Nh)
    , c (m04ucr_10a4$coef[1], m04ucr_10a4$ci[3,], m04ucr_10a4$pv[3], m04ucr_10a4$bws[1,1], m04ucr_10a4$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # position in party list
    c (m04gov_07d4$coef[1], m04gov_07d4$ci[3,], m04gov_07d4$pv[3], m04gov_07d4$bws[1,1], m04gov_07d4$Nh)
    , c (m04pj_07d4$coef[1], m04pj_07d4$ci[3,], m04pj_07d4$pv[3], m04pj_07d4$bws[1,1], m04pj_07d4$Nh)
    , c (m04ucr_07d4$coef[1], m04ucr_07d4$ci[3,], m04ucr_07d4$pv[3], m04ucr_07d4$bws[1,1], m04ucr_07d4$Nh)
    
    # legislator before
    , c (m04gov_01d4$coef[1], m04gov_01d4$ci[3,], m04gov_01d4$pv[3], m04gov_01d4$bws[1,1], m04gov_01d4$Nh)
    , c (m04pj_01d4$coef[1], m04pj_01d4$ci[3,], m04pj_01d4$pv[3], m04pj_01d4$bws[1,1], m04pj_01d4$Nh)
    , c (m04ucr_01d4$coef[1], m04ucr_01d4$ci[3,], m04ucr_01d4$pv[3], m04ucr_01d4$bws[1,1], m04ucr_01d4$Nh)
    
    # executive before
    , c (m04gov_02d4$coef[1], m04gov_02d4$ci[3,], m04gov_02d4$pv[3], m04gov_02d4$bws[1,1], m04gov_02d4$Nh)
    , c (m04pj_02d4$coef[1], m04pj_02d4$ci[3,], m04pj_02d4$pv[3], m04pj_02d4$bws[1,1], m04pj_02d4$Nh)
    , c (m04ucr_02d4$coef[1], m04ucr_02d4$ci[3,], m04ucr_02d4$pv[3], m04ucr_02d4$bws[1,1], m04ucr_02d4$Nh)
    
    # any position before
    , c (m04gov_03d4$coef[1], m04gov_03d4$ci[3,], m04gov_03d4$pv[3], m04gov_03d4$bws[1,1], m04gov_03d4$Nh)
    , c (m04pj_03d4$coef[1], m04pj_03d4$ci[3,], m04pj_03d4$pv[3], m04pj_03d4$bws[1,1], m04pj_03d4$Nh)
    , c (m04ucr_03d4$coef[1], m04ucr_03d4$ci[3,], m04ucr_03d4$pv[3], m04ucr_03d4$bws[1,1], m04ucr_03d4$Nh)
    
    # terms served before
    , c (m04gov_04d4$coef[1], m04gov_04d4$ci[3,], m04gov_04d4$pv[3], m04gov_04d4$bws[1,1], m04gov_04d4$Nh)
    , c (m04pj_04d4$coef[1], m04pj_04d4$ci[3,], m04pj_04d4$pv[3], m04pj_04d4$bws[1,1], m04pj_04d4$Nh)
    , c (m04ucr_04d4$coef[1], m04ucr_04d4$ci[3,], m04ucr_04d4$pv[3], m04ucr_04d4$bws[1,1], m04ucr_04d4$Nh)
    
    # female
    , c (m04gov_05d4$coef[1], m04gov_05d4$ci[3,], m04gov_05d4$pv[3], m04gov_05d4$bws[1,1], m04gov_05d4$Nh)
    , c (m04pj_05d4$coef[1], m04pj_05d4$ci[3,], m04pj_05d4$pv[3], m04pj_05d4$bws[1,1], m04pj_05d4$Nh)
    , c (m04ucr_05d4$coef[1], m04ucr_05d4$ci[3,], m04ucr_05d4$pv[3], m04ucr_05d4$bws[1,1], m04ucr_05d4$Nh)
    
    # president's party
    , c (m04gov_06d4$coef[1], m04gov_06d4$ci[3,], m04gov_06d4$pv[3], m04gov_06d4$bws[1,1], m04gov_06d4$Nh)
    , c (m04pj_06d4$coef[1], m04pj_06d4$ci[3,], m04pj_06d4$pv[3], m04pj_06d4$bws[1,1], m04pj_06d4$Nh)
    , c (m04ucr_06d4$coef[1], m04ucr_06d4$ci[3,], m04ucr_06d4$pv[3], m04ucr_06d4$bws[1,1], m04ucr_06d4$Nh)
    
    # midterm election
    , c (m04gov_08d4$coef[1], m04gov_08d4$ci[3,], m04gov_08d4$pv[3], m04gov_08d4$bws[1,1], m04gov_08d4$Nh)
    , c (m04pj_08d4$coef[1], m04pj_08d4$ci[3,], m04pj_08d4$pv[3], m04pj_08d4$bws[1,1], m04pj_08d4$Nh)
    , c (m04ucr_08d4$coef[1], m04ucr_08d4$ci[3,], m04ucr_08d4$pv[3], m04ucr_08d4$bws[1,1], m04ucr_08d4$Nh)
    
    # district magnitude
    , c (m04gov_09d4$coef[1], m04gov_09d4$ci[3,], m04gov_09d4$pv[3], m04gov_09d4$bws[1,1], m04gov_09d4$Nh)
    , c (m04pj_09d4$coef[1], m04pj_09d4$ci[3,], m04pj_09d4$pv[3], m04pj_09d4$bws[1,1], m04pj_09d4$Nh)
    , c (m04ucr_09d4$coef[1], m04ucr_09d4$ci[3,], m04ucr_09d4$pv[3], m04ucr_09d4$bws[1,1], m04ucr_09d4$Nh)
    
    # large magnitude election
    , c (m04gov_10d4$coef[1], m04gov_10d4$ci[3,], m04gov_10d4$pv[3], m04gov_10d4$bws[1,1], m04gov_10d4$Nh)
    , c (m04pj_10d4$coef[1], m04pj_10d4$ci[3,], m04pj_10d4$pv[3], m04pj_10d4$bws[1,1], m04pj_10d4$Nh)
    , c (m04ucr_10d4$coef[1], m04ucr_10d4$ci[3,], m04ucr_10d4$pv[3], m04ucr_10d4$bws[1,1], m04ucr_10d4$Nh))))
(tabBal01b <- cbind (
  sprintf ("%.2f", tabBal01a[,1])
  , paste ("[", sprintf ("%.2f", tabBal01a[,2]), ":", sprintf ("%.2f", tabBal01a[,3]), "]", sep="")
  , sprintf ("%.2f", tabBal01a[,4])
  , sprintf ("%.2f", tabBal01a[,5])
  , paste (sprintf ("%.0f", tabBal01a[,6]), "$|$", sprintf ("%.0f", tabBal01a[,7]), sep="")
  , rep ("", nrow (tabBal01a))
  , sprintf ("%.2f", tabBal01a[,8])
  , paste ("[", sprintf ("%.2f", tabBal01a[,9]), ":", sprintf ("%.2f", tabBal01a[,10]), "]", sep="")
  , sprintf ("%.2f", tabBal01a[,11])
  , sprintf ("%.2f", tabBal01a[,12])
  , paste (sprintf ("%.0f", tabBal01a[,13]), "$|$", sprintf ("%.0f", tabBal01a[,14]), sep="")))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 10)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{position in list}} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[0.75ex] \\multicolumn{12}{l}{\\emph{legislator (before)} (0/1)} \\\\ \\midrule \n")
Header4 <- paste ("[0.75ex] \\multicolumn{12}{l}{\\emph{executive (before) (0/1)}} \\\\ \\midrule \n")
Header5 <- paste ("[0.75ex] \\multicolumn{12}{l}{\\emph{any office (before) (0/1)}} \\\\ \\midrule \n")
Header6 <- paste ("[0.75ex] \\multicolumn{12}{l}{\\emph{terms served (before)}} \\\\ \\midrule \n")
Header7 <- paste ("[0.75ex] \\multicolumn{12}{l}{\\emph{female} (0/1)} \\\\ \\midrule \n")
Header8 <- paste ("[0.75ex] \\multicolumn{12}{l}{\\emph{president's party} (0/1)} \\\\ \\midrule \n")
Header9 <- paste ("[0.75ex] \\multicolumn{12}{l}{\\emph{midterm election} (0/1)} \\\\ \\midrule \n")
Header10 <- paste ("[0.75ex] \\multicolumn{12}{l}{\\emph{district magnitude} (log)} \\\\ \\midrule \n")
Header11 <- paste ("[0.75ex] \\multicolumn{12}{l}{\\emph{large magnitude} (0/1)} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$pos[[4]] <- 6
addtorow$pos[[5]] <- 9
addtorow$pos[[6]] <- 12
addtorow$pos[[7]] <- 15
addtorow$pos[[8]] <- 18
addtorow$pos[[9]] <- 21
addtorow$pos[[10]] <- 24
addtorow$pos[[11]] <- 27
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6, Header7, Header8, Header9, Header10, Header11)
print (xtable (  cbind (rows, tabBal01b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="Balance checks"
                 , label="T:balance")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="scriptsize"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA03.tex")


### Table A4
(tabPower01a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (sd (filter (base.g, running<0)$renom), m02gov_01a4$coef[1], m06gov_01a4a$power.rbc, m06gov_01a4b$power.rbc, m06gov_01a4c$power.rbc, m02gov_01a4$Nh[1], m06gov_01a4samp01$sampsi.h.l, m06gov_01a4samp02$sampsi.h.l, m06gov_01a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_01a4$Nh[2], m06gov_01a4samp01$sampsi.h.r, m06gov_01a4samp02$sampsi.h.r, m06gov_01a4samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$renom), m02pj_01a4$coef[1], m06pj_01a4a$power.rbc, m06pj_01a4b$power.rbc, m06pj_01a4c$power.rbc, m02pj_01a4$Nh[1], m06pj_01a4samp01$sampsi.h.l, m06pj_01a4samp02$sampsi.h.l, m06pj_01a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_01a4$Nh[2], m06pj_01a4samp01$sampsi.h.r, m06pj_01a4samp02$sampsi.h.r, m06pj_01a4samp03$sampsi.h.r)
    , c (sd (filter (base.r, running<0)$renom), m02ucr_01a4$coef[1], m06ucr_01a4a$power.rbc, m06ucr_01a4b$power.rbc, m06ucr_01a4c$power.rbc, m02ucr_01a4$Nh[1], m06ucr_01a4samp01$sampsi.h.l, m06ucr_01a4samp02$sampsi.h.l, m06ucr_01a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_01a4$Nh[2], m06ucr_01a4samp01$sampsi.h.r, m06ucr_01a4samp02$sampsi.h.r, m06ucr_01a4samp03$sampsi.h.r)
    
    # legislator afterwards
    , c (sd (filter (base.g, running<0)$legAfter), m02gov_02a4$coef[1], m06gov_02a4a$power.rbc, m06gov_02a4b$power.rbc, m06gov_02a4c$power.rbc, m02gov_02a4$Nh[1], m06gov_02a4samp01$sampsi.h.l, m06gov_02a4samp02$sampsi.h.l, m06gov_02a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_02a4$Nh[2], m06gov_02a4samp01$sampsi.h.r, m06gov_02a4samp02$sampsi.h.r, m06gov_02a4samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$legAfter), m02pj_02a4$coef[1], m06pj_02a4a$power.rbc, m06pj_02a4b$power.rbc, m06pj_02a4c$power.rbc, m02pj_02a4$Nh[1], m06pj_02a4samp01$sampsi.h.l, m06pj_02a4samp02$sampsi.h.l, m06pj_02a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_02a4$Nh[2], m06pj_02a4samp01$sampsi.h.r, m06pj_02a4samp02$sampsi.h.r, m06pj_02a4samp03$sampsi.h.r)
    , c (sd (filter (base.r, running<0)$legAfter), m02ucr_02a4$coef[1], m06ucr_02a4a$power.rbc, m06ucr_02a4b$power.rbc, m06ucr_02a4c$power.rbc, m02ucr_02a4$Nh[1], m06ucr_02a4samp01$sampsi.h.l, m06ucr_02a4samp02$sampsi.h.l, m06ucr_02a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_02a4$Nh[2], m06ucr_02a4samp01$sampsi.h.r, m06ucr_02a4samp02$sampsi.h.r, m06ucr_02a4samp03$sampsi.h.r)
    
    # executive afterwards
    , c (sd (filter (base.g, running<0)$exeAfter), m02gov_03a4$coef[1], m06gov_03a4a$power.rbc, m06gov_03a4b$power.rbc, m06gov_03a4c$power.rbc, m02gov_03a4$Nh[1], m06gov_03a4samp01$sampsi.h.l, m06gov_03a4samp02$sampsi.h.l, m06gov_03a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_03a4$Nh[2], m06gov_03a4samp01$sampsi.h.r, m06gov_03a4samp02$sampsi.h.r, m06gov_03a4samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$exeAfter), m02pj_03a4$coef[1], m06pj_03a4a$power.rbc, m06pj_03a4b$power.rbc, m06pj_03a4c$power.rbc, m02pj_03a4$Nh[1], m06pj_03a4samp01$sampsi.h.l, m06pj_03a4samp02$sampsi.h.l, m06pj_03a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_03a4$Nh[2], m06pj_03a4samp01$sampsi.h.r, m06pj_03a4samp02$sampsi.h.r, m06pj_03a4samp03$sampsi.h.r)
    , c (sd (filter (base.r, running<0)$exeAfter), m02ucr_03a4$coef[1], m06ucr_03a4a$power.rbc, m06ucr_03a4b$power.rbc, m06ucr_03a4c$power.rbc, m02ucr_03a4$Nh[1], m06ucr_03a4samp01$sampsi.h.l, m06ucr_03a4samp02$sampsi.h.l, m06ucr_03a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_03a4$Nh[2], m06ucr_03a4samp01$sampsi.h.r, m06ucr_03a4samp02$sampsi.h.r, m06ucr_03a4samp03$sampsi.h.r)
    
    # any position afterwards
    , c (sd (filter (base.g, running<0)$anyAfter), m02gov_05a4$coef[1], m06gov_04a4a$power.rbc, m06gov_04a4b$power.rbc, m06gov_04a4c$power.rbc, m02gov_05a4$Nh[1], m06gov_04a4samp01$sampsi.h.l, m06gov_04a4samp02$sampsi.h.l, m06gov_04a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_05a4$Nh[2], m06gov_04a4samp01$sampsi.h.r, m06gov_04a4samp02$sampsi.h.r, m06gov_04a4samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$anyAfter), m02pj_05a4$coef[1], m06pj_04a4a$power.rbc, m06pj_04a4b$power.rbc, m06pj_04a4c$power.rbc, m02pj_05a4$Nh[1], m06pj_04a4samp01$sampsi.h.l, m06pj_04a4samp02$sampsi.h.l, m06pj_04a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_05a4$Nh[2], m06pj_04a4samp01$sampsi.h.r, m06pj_04a4samp02$sampsi.h.r, m06pj_04a4samp03$sampsi.h.r)
    , c (sd (filter (base.r, running<0)$anyAfter), m02ucr_05a4$coef[1], m06ucr_04a4a$power.rbc, m06ucr_04a4b$power.rbc, m06ucr_04a4c$power.rbc, m02ucr_05a4$Nh[1], m06ucr_04a4samp01$sampsi.h.l, m06ucr_04a4samp02$sampsi.h.l, m06ucr_04a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_05a4$Nh[2], m06ucr_04a4samp01$sampsi.h.r, m06ucr_04a4samp02$sampsi.h.r, m06ucr_04a4samp03$sampsi.h.r)
    
    # terms served afterwards
    , c (sd (filter (base.g, running<0)$valAfter.eq), m02gov_06a4$coef[1], m06gov_05a4a$power.rbc, m06gov_05a4b$power.rbc, m06gov_05a4c$power.rbc, m02gov_06a4$Nh[1], m06gov_05a4samp01$sampsi.h.l, m06gov_05a4samp02$sampsi.h.l, m06gov_05a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_06a4$Nh[2], m06gov_05a4samp01$sampsi.h.r, m06gov_05a4samp02$sampsi.h.r, m06gov_05a4samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$valAfter.eq), m02pj_06a4$coef[1], m06pj_05a4a$power.rbc, m06pj_05a4b$power.rbc, m06pj_05a4c$power.rbc, m02pj_06a4$Nh[1], m06pj_05a4samp01$sampsi.h.l, m06pj_05a4samp02$sampsi.h.l, m06pj_05a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_06a4$Nh[2], m06pj_05a4samp01$sampsi.h.r, m06pj_05a4samp02$sampsi.h.r, m06pj_05a4samp03$sampsi.h.r)
    , c (sd (filter (base.r, running<0)$valAfter.eq), m02ucr_06a4$coef[1], m06ucr_05a4a$power.rbc, m06ucr_05a4b$power.rbc, m06ucr_05a4c$power.rbc, m02ucr_06a4$Nh[1], m06ucr_05a4samp01$sampsi.h.l, m06ucr_05a4samp02$sampsi.h.l, m06ucr_05a4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_06a4$Nh[2], m06ucr_05a4samp01$sampsi.h.r, m06ucr_05a4samp02$sampsi.h.r, m06ucr_05a4samp03$sampsi.h.r)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (sd (filter (base.g, largeProv==0 & running<0)$renom), m02gov_01d4$coef[1], m06gov_01d4a$power.rbc, m06gov_01d4b$power.rbc, m06gov_01d4c$power.rbc, m02gov_01d4$Nh[1], m06gov_01d4samp01$sampsi.h.l, m06gov_01d4samp02$sampsi.h.l, m06gov_01d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_01d4$Nh[2], m06gov_01d4samp01$sampsi.h.r, m06gov_01d4samp02$sampsi.h.r, m06gov_01d4samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$renom), m02pj_01d4$coef[1], m06pj_01d4a$power.rbc, m06pj_01d4b$power.rbc, m06pj_01d4c$power.rbc, m02pj_01d4$Nh[1], m06pj_01d4samp01$sampsi.h.l, m06pj_01d4samp02$sampsi.h.l, m06pj_01d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_01d4$Nh[2], m06pj_01d4samp01$sampsi.h.r, m06pj_01d4samp02$sampsi.h.r, m06pj_01d4samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$renom), m02ucr_01d4$coef[1], m06ucr_01d4a$power.rbc, m06ucr_01d4b$power.rbc, m06ucr_01d4c$power.rbc, m02ucr_01d4$Nh[1], m06ucr_01d4samp01$sampsi.h.l, m06ucr_01d4samp02$sampsi.h.l, m06ucr_01d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_01d4$Nh[2], m06ucr_01d4samp01$sampsi.h.r, m06ucr_01d4samp02$sampsi.h.r, m06ucr_01d4samp03$sampsi.h.r)
    
    # legislator afterwards
    , c (sd (filter (base.g, largeProv==0 & running<0)$legAfter), m02gov_02d4$coef[1], m06gov_02d4a$power.rbc, m06gov_02d4b$power.rbc, m06gov_02d4c$power.rbc, m02gov_02d4$Nh[1], m06gov_02d4samp01$sampsi.h.l, m06gov_02d4samp02$sampsi.h.l, m06gov_02d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_02d4$Nh[2], m06gov_02d4samp01$sampsi.h.r, m06gov_02d4samp02$sampsi.h.r, m06gov_02d4samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$legAfter), m02pj_02d4$coef[1], m06pj_02d4a$power.rbc, m06pj_02d4b$power.rbc, m06pj_02d4c$power.rbc, m02pj_02d4$Nh[1], m06pj_02d4samp01$sampsi.h.l, m06pj_02d4samp02$sampsi.h.l, m06pj_02d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_02d4$Nh[2], m06pj_02d4samp01$sampsi.h.r, m06pj_02d4samp02$sampsi.h.r, m06pj_02d4samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$legAfter), m02ucr_02d4$coef[1], m06ucr_02d4a$power.rbc, m06ucr_02d4b$power.rbc, m06ucr_02d4c$power.rbc, m02ucr_02d4$Nh[1], m06ucr_02d4samp01$sampsi.h.l, m06ucr_02d4samp02$sampsi.h.l, m06ucr_02d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_02d4$Nh[2], m06ucr_02d4samp01$sampsi.h.r, m06ucr_02d4samp02$sampsi.h.r, m06ucr_02d4samp03$sampsi.h.r)
    
    # executive afterwards
    , c (sd (filter (base.g, largeProv==0 & running<0)$exeAfter), m02gov_03d4$coef[1], m06gov_03d4a$power.rbc, m06gov_03d4b$power.rbc, m06gov_03d4c$power.rbc, m02gov_03d4$Nh[1], m06gov_03d4samp01$sampsi.h.l, m06gov_03d4samp02$sampsi.h.l, m06gov_03d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_03d4$Nh[2], m06gov_03d4samp01$sampsi.h.r, m06gov_03d4samp02$sampsi.h.r, m06gov_03d4samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$exeAfter), m02pj_03d4$coef[1], m06pj_03d4a$power.rbc, m06pj_03d4b$power.rbc, m06pj_03d4c$power.rbc, m02pj_03d4$Nh[1], m06pj_03d4samp01$sampsi.h.l, m06pj_03d4samp02$sampsi.h.l, m06pj_03d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_03d4$Nh[2], m06pj_03d4samp01$sampsi.h.r, m06pj_03d4samp02$sampsi.h.r, m06pj_03d4samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$exeAfter), m02ucr_03d4$coef[1], m06ucr_03d4a$power.rbc, m06ucr_03d4b$power.rbc, m06ucr_03d4c$power.rbc, m02ucr_03d4$Nh[1], m06ucr_03d4samp01$sampsi.h.l, m06ucr_03d4samp02$sampsi.h.l, m06ucr_03d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_03d4$Nh[2], m06ucr_03d4samp01$sampsi.h.r, m06ucr_03d4samp02$sampsi.h.r, m06ucr_03d4samp03$sampsi.h.r)
    
    # any position afterwards
    , c (sd (filter (base.g, largeProv==0 & running<0)$anyAfter), m02gov_05d4$coef[1], m06gov_04d4a$power.rbc, m06gov_04d4b$power.rbc, m06gov_04d4c$power.rbc, m02gov_05d4$Nh[1], m06gov_04d4samp01$sampsi.h.l, m06gov_04d4samp02$sampsi.h.l, m06gov_04d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_05d4$Nh[2], m06gov_04d4samp01$sampsi.h.r, m06gov_04d4samp02$sampsi.h.r, m06gov_04d4samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$anyAfter), m02pj_05d4$coef[1], m06pj_04d4a$power.rbc, m06pj_04d4b$power.rbc, m06pj_04d4c$power.rbc, m02pj_05d4$Nh[1], m06pj_04d4samp01$sampsi.h.l, m06pj_04d4samp02$sampsi.h.l, m06pj_04d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_05d4$Nh[2], m06pj_04d4samp01$sampsi.h.r, m06pj_04d4samp02$sampsi.h.r, m06pj_04d4samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$anyAfter), m02ucr_05d4$coef[1], m06ucr_04d4a$power.rbc, m06ucr_04d4b$power.rbc, m06ucr_04d4c$power.rbc, m02ucr_05d4$Nh[1], m06ucr_04d4samp01$sampsi.h.l, m06ucr_04d4samp02$sampsi.h.l, m06ucr_04d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_05d4$Nh[2], m06ucr_04d4samp01$sampsi.h.r, m06ucr_04d4samp02$sampsi.h.r, m06ucr_04d4samp03$sampsi.h.r)
    
    # terms served afterwards
    , c (sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq), m02gov_06d4$coef[1], m06gov_05d4a$power.rbc, m06gov_05d4b$power.rbc, m06gov_05d4c$power.rbc, m02gov_06d4$Nh[1], m06gov_05d4samp01$sampsi.h.l, m06gov_05d4samp02$sampsi.h.l, m06gov_05d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_06d4$Nh[2], m06gov_05d4samp01$sampsi.h.r, m06gov_05d4samp02$sampsi.h.r, m06gov_05d4samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq), m02pj_06d4$coef[1], m06pj_05d4a$power.rbc, m06pj_05d4b$power.rbc, m06pj_05d4c$power.rbc, m02pj_06d4$Nh[1], m06pj_05d4samp01$sampsi.h.l, m06pj_05d4samp02$sampsi.h.l, m06pj_05d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_06d4$Nh[2], m06pj_05d4samp01$sampsi.h.r, m06pj_05d4samp02$sampsi.h.r, m06pj_05d4samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq), m02ucr_06d4$coef[1], m06ucr_05d4a$power.rbc, m06ucr_05d4b$power.rbc, m06ucr_05d4c$power.rbc, m02ucr_06d4$Nh[1], m06ucr_05d4samp01$sampsi.h.l, m06ucr_05d4samp02$sampsi.h.l, m06ucr_05d4samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_06d4$Nh[2], m06ucr_05d4samp01$sampsi.h.r, m06ucr_05d4samp02$sampsi.h.r, m06ucr_05d4samp03$sampsi.h.r))))

(tabPower01b <- cbind (
  sprintf ("%.2f", tabPower01a[,1])
  , sprintf ("%.2f", tabPower01a[,2])
  , rep ("", nrow (tabPower01a))
  , sprintf ("%.2f", tabPower01a[,3])
  , sprintf ("%.2f", tabPower01a[,4])
  , sprintf ("%.2f", tabPower01a[,5])
  , rep ("", nrow (tabPower01a))
  , sprintf ("%.0f", tabPower01a[,6])
  , sprintf ("%.0f", tabPower01a[,7])
  , sprintf ("%.0f", tabPower01a[,8])
  , sprintf ("%.0f", tabPower01a[,9])
  , rep ("", nrow (tabPower01a))
  , sprintf ("%.2f", tabPower01a[,10])
  , sprintf ("%.2f", tabPower01a[,11])
  , rep ("", nrow (tabPower01a))
  , sprintf ("%.2f", tabPower01a[,12])
  , sprintf ("%.2f", tabPower01a[,13])
  , sprintf ("%.2f", tabPower01a[,14])
  , rep ("", nrow (tabPower01a))
  , sprintf ("%.0f", tabPower01a[,15])
  , sprintf ("%.0f", tabPower01a[,16])
  , sprintf ("%.0f", tabPower01a[,17])
  , sprintf ("%.0f", tabPower01a[,18])))
tabPower01b[tabPower01b=="NA"] <- ""

rows <- rep (c ("Governor's", "", "\\textsc{pj}", "", "\\textsc{ucr}", ""), 5)

Header1 <- paste ("\\toprule & \\multicolumn{11}{c}{(a) All provinces} & & \\multicolumn{11}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-12} \\cmidrule{14-24} \n")
Header2 <- paste ("& & & & \\multicolumn{3}{c}{power} & & \\multicolumn{4}{c}{sample size} & & & & & \\multicolumn{3}{c}{power} & & \\multicolumn{4}{c}{sample size} \\\\ \\cmidrule{5-7} \\cmidrule{9-12} \\cmidrule{17-19} \\cmidrule{21-24} \n")
Header3 <- paste ("& \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$\\hat{\\beta}$} & & \\multicolumn{1}{c}{$\\frac{\\text{\\textsc{sd}}_{C}}{2}$} & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$|\\hat{\\beta}|$} & & \\multicolumn{1}{c}{actual} & \\multicolumn{1}{c}{$\\frac{\\text{\\textsc{sd}}_{C}}{2}$} & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$|\\hat{\\beta}|$} & & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$\\hat{\\beta}$} & & \\multicolumn{1}{c}{$\\frac{\\text{\\textsc{sd}}_{C}}{2}$} & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$|\\hat{\\beta}|$} & & \\multicolumn{1}{c}{actual} & \\multicolumn{1}{c}{$\\frac{\\text{\\textsc{sd}}_{C}}{2}$} & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$|\\hat{\\beta}|$} \\\\ \\cmidrule{2-24} \n")
Header4 <- paste ("\\multicolumn{24}{l}{\\emph{renomination} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{24}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{24}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header7 <- paste ("[1.5ex] \\multicolumn{24}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header8 <- paste ("[1.5ex] \\multicolumn{24}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 0
addtorow$pos[[4]] <- 0
addtorow$pos[[5]] <- 6
addtorow$pos[[6]] <- 12
addtorow$pos[[7]] <- 18
addtorow$pos[[8]] <- 24
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6, Header7, Header8)
print (xtable (  cbind (rows, tabPower01b)
                 , align=c ("l","l","r","r","r","r","r","r","r","c","r","r","r","r","r","r","r","r","r","r","r","c","r","r","r")
                 , digits=2
                 , caption="Power and sample size calculations (1): Main results"
                 , label="T:power01")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="footnotesize"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA04.tex")


### Table A5
(tabPower02a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (sd (filter (base.g, running<0)$renom), m02gov_01a5$coef[1], m06gov_01a5a$power.rbc, m06gov_01a5b$power.rbc, m06gov_01a5c$power.rbc, m02gov_01a5$Nh[1], m06gov_01a5samp01$sampsi.h.l, m06gov_01a5samp02$sampsi.h.l, m06gov_01a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_01a5$Nh[2], m06gov_01a5samp01$sampsi.h.r, m06gov_01a5samp02$sampsi.h.r, m06gov_01a5samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$renom), m02pj_01a5$coef[1], m06pj_01a5a$power.rbc, m06pj_01a5b$power.rbc, m06pj_01a5c$power.rbc, m02pj_01a5$Nh[1], m06pj_01a5samp01$sampsi.h.l, m06pj_01a5samp02$sampsi.h.l, m06pj_01a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_01a5$Nh[2], m06pj_01a5samp01$sampsi.h.r, m06pj_01a5samp02$sampsi.h.r, m06pj_01a5samp03$sampsi.h.r)
    , c (sd (filter (base.r, running<0)$renom), m02ucr_01a5$coef[1], m06ucr_01a5a$power.rbc, m06ucr_01a5b$power.rbc, m06ucr_01a5c$power.rbc, m02ucr_01a5$Nh[1], m06ucr_01a5samp01$sampsi.h.l, m06ucr_01a5samp02$sampsi.h.l, m06ucr_01a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_01a5$Nh[2], m06ucr_01a5samp01$sampsi.h.r, m06ucr_01a5samp02$sampsi.h.r, m06ucr_01a5samp03$sampsi.h.r)
    
    # legislator afterwards
    , c (sd (filter (base.g, running<0)$legAfter), m02gov_02a5$coef[1], m06gov_02a5a$power.rbc, m06gov_02a5b$power.rbc, m06gov_02a5c$power.rbc, m02gov_02a5$Nh[1], m06gov_02a5samp01$sampsi.h.l, m06gov_02a5samp02$sampsi.h.l, m06gov_02a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_02a5$Nh[2], m06gov_02a5samp01$sampsi.h.r, m06gov_02a5samp02$sampsi.h.r, m06gov_02a5samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$legAfter), m02pj_02a5$coef[1], m06pj_02a5a$power.rbc, m06pj_02a5b$power.rbc, m06pj_02a5c$power.rbc, m02pj_02a5$Nh[1], m06pj_02a5samp01$sampsi.h.l, m06pj_02a5samp02$sampsi.h.l, m06pj_02a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_02a5$Nh[2], m06pj_02a5samp01$sampsi.h.r, m06pj_02a5samp02$sampsi.h.r, m06pj_02a5samp03$sampsi.h.r)
    , c (sd (filter (base.r, running<0)$legAfter), m02ucr_02a5$coef[1], m06ucr_02a5a$power.rbc, m06ucr_02a5b$power.rbc, m06ucr_02a5c$power.rbc, m02ucr_02a5$Nh[1], m06ucr_02a5samp01$sampsi.h.l, m06ucr_02a5samp02$sampsi.h.l, m06ucr_02a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_02a5$Nh[2], m06ucr_02a5samp01$sampsi.h.r, m06ucr_02a5samp02$sampsi.h.r, m06ucr_02a5samp03$sampsi.h.r)
    
    # executive afterwards
    , c (sd (filter (base.g, running<0)$exeAfter), m02gov_03a5$coef[1], m06gov_03a5a$power.rbc, m06gov_03a5b$power.rbc, m06gov_03a5c$power.rbc, m02gov_03a5$Nh[1], m06gov_03a5samp01$sampsi.h.l, m06gov_03a5samp02$sampsi.h.l, m06gov_03a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_03a5$Nh[2], m06gov_03a5samp01$sampsi.h.r, m06gov_03a5samp02$sampsi.h.r, m06gov_03a5samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$exeAfter), m02pj_03a5$coef[1], m06pj_03a5a$power.rbc, m06pj_03a5b$power.rbc, m06pj_03a5c$power.rbc, m02pj_03a5$Nh[1], m06pj_03a5samp01$sampsi.h.l, m06pj_03a5samp02$sampsi.h.l, m06pj_03a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_03a5$Nh[2], m06pj_03a5samp01$sampsi.h.r, m06pj_03a5samp02$sampsi.h.r, m06pj_03a5samp03$sampsi.h.r)
    , c (sd (filter (base.r, running<0)$exeAfter), m02ucr_03a5$coef[1], m06ucr_03a5a$power.rbc, m06ucr_03a5b$power.rbc, m06ucr_03a5c$power.rbc, m02ucr_03a5$Nh[1], m06ucr_03a5samp01$sampsi.h.l, m06ucr_03a5samp02$sampsi.h.l, m06ucr_03a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_03a5$Nh[2], m06ucr_03a5samp01$sampsi.h.r, m06ucr_03a5samp02$sampsi.h.r, m06ucr_03a5samp03$sampsi.h.r)
    
    # any position afterwards
    , c (sd (filter (base.g, running<0)$anyAfter), m02gov_05a5$coef[1], m06gov_04a5a$power.rbc, m06gov_04a5b$power.rbc, m06gov_04a5c$power.rbc, m02gov_05a5$Nh[1], m06gov_04a5samp01$sampsi.h.l, m06gov_04a5samp02$sampsi.h.l, m06gov_04a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_05a5$Nh[2], m06gov_04a5samp01$sampsi.h.r, m06gov_04a5samp02$sampsi.h.r, m06gov_04a5samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$anyAfter), m02pj_05a5$coef[1], m06pj_04a5a$power.rbc, m06pj_04a5b$power.rbc, m06pj_04a5c$power.rbc, m02pj_05a5$Nh[1], m06pj_04a5samp01$sampsi.h.l, m06pj_04a5samp02$sampsi.h.l, m06pj_04a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_05a5$Nh[2], m06pj_04a5samp01$sampsi.h.r, m06pj_04a5samp02$sampsi.h.r, m06pj_04a5samp03$sampsi.h.r)
    , c (sd (filter (base.r, running<0)$anyAfter), m02ucr_05a5$coef[1], m06ucr_04a5a$power.rbc, m06ucr_04a5b$power.rbc, m06ucr_04a5c$power.rbc, m02ucr_05a5$Nh[1], m06ucr_04a5samp01$sampsi.h.l, m06ucr_04a5samp02$sampsi.h.l, m06ucr_04a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_05a5$Nh[2], m06ucr_04a5samp01$sampsi.h.r, m06ucr_04a5samp02$sampsi.h.r, m06ucr_04a5samp03$sampsi.h.r)
    
    # terms served afterwards
    , c (sd (filter (base.g, running<0)$valAfter.eq), m02gov_06a5$coef[1], m06gov_05a5a$power.rbc, m06gov_05a5b$power.rbc, m06gov_05a5c$power.rbc, m02gov_06a5$Nh[1], m06gov_05a5samp01$sampsi.h.l, m06gov_05a5samp02$sampsi.h.l, m06gov_05a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_06a5$Nh[2], m06gov_05a5samp01$sampsi.h.r, m06gov_05a5samp02$sampsi.h.r, m06gov_05a5samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$valAfter.eq), m02pj_06a5$coef[1], m06pj_05a5a$power.rbc, m06pj_05a5b$power.rbc, m06pj_05a5c$power.rbc, m02pj_06a5$Nh[1], m06pj_05a5samp01$sampsi.h.l, m06pj_05a5samp02$sampsi.h.l, m06pj_05a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_06a5$Nh[2], m06pj_05a5samp01$sampsi.h.r, m06pj_05a5samp02$sampsi.h.r, m06pj_05a5samp03$sampsi.h.r)
    , c (sd (filter (base.r, running<0)$valAfter.eq), m02ucr_06a5$coef[1], m06ucr_05a5a$power.rbc, m06ucr_05a5b$power.rbc, m06ucr_05a5c$power.rbc, m02ucr_06a5$Nh[1], m06ucr_05a5samp01$sampsi.h.l, m06ucr_05a5samp02$sampsi.h.l, m06ucr_05a5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_06a5$Nh[2], m06ucr_05a5samp01$sampsi.h.r, m06ucr_05a5samp02$sampsi.h.r, m06ucr_05a5samp03$sampsi.h.r)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (sd (filter (base.g, largeProv==0 & running<0)$renom), m02gov_01d5$coef[1], m06gov_01d5a$power.rbc, m06gov_01d5b$power.rbc, m06gov_01d5c$power.rbc, m02gov_01d5$Nh[1], m06gov_01d5samp01$sampsi.h.l, m06gov_01d5samp02$sampsi.h.l, m06gov_01d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_01d5$Nh[2], m06gov_01d5samp01$sampsi.h.r, m06gov_01d5samp02$sampsi.h.r, m06gov_01d5samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$renom), m02pj_01d5$coef[1], m06pj_01d5a$power.rbc, m06pj_01d5b$power.rbc, m06pj_01d5c$power.rbc, m02pj_01d5$Nh[1], m06pj_01d5samp01$sampsi.h.l, m06pj_01d5samp02$sampsi.h.l, m06pj_01d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_01d5$Nh[2], m06pj_01d5samp01$sampsi.h.r, m06pj_01d5samp02$sampsi.h.r, m06pj_01d5samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$renom), m02ucr_01d5$coef[1], m06ucr_01d5a$power.rbc, m06ucr_01d5b$power.rbc, m06ucr_01d5c$power.rbc, m02ucr_01d5$Nh[1], m06ucr_01d5samp01$sampsi.h.l, m06ucr_01d5samp02$sampsi.h.l, m06ucr_01d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_01d5$Nh[2], m06ucr_01d5samp01$sampsi.h.r, m06ucr_01d5samp02$sampsi.h.r, m06ucr_01d5samp03$sampsi.h.r)
    
    # legislator afterwards
    , c (sd (filter (base.g, largeProv==0 & running<0)$legAfter), m02gov_02d5$coef[1], m06gov_02d5a$power.rbc, m06gov_02d5b$power.rbc, m06gov_02d5c$power.rbc, m02gov_02d5$Nh[1], m06gov_02d5samp01$sampsi.h.l, m06gov_02d5samp02$sampsi.h.l, m06gov_02d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_02d5$Nh[2], m06gov_02d5samp01$sampsi.h.r, m06gov_02d5samp02$sampsi.h.r, m06gov_02d5samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$legAfter), m02pj_02d5$coef[1], m06pj_02d5a$power.rbc, m06pj_02d5b$power.rbc, m06pj_02d5c$power.rbc, m02pj_02d5$Nh[1], m06pj_02d5samp01$sampsi.h.l, m06pj_02d5samp02$sampsi.h.l, m06pj_02d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_02d5$Nh[2], m06pj_02d5samp01$sampsi.h.r, m06pj_02d5samp02$sampsi.h.r, m06pj_02d5samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$legAfter), m02ucr_02d5$coef[1], m06ucr_02d5a$power.rbc, m06ucr_02d5b$power.rbc, m06ucr_02d5c$power.rbc, m02ucr_02d5$Nh[1], m06ucr_02d5samp01$sampsi.h.l, m06ucr_02d5samp02$sampsi.h.l, m06ucr_02d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_02d5$Nh[2], m06ucr_02d5samp01$sampsi.h.r, m06ucr_02d5samp02$sampsi.h.r, m06ucr_02d5samp03$sampsi.h.r)
    
    # executive afterwards
    , c (sd (filter (base.g, largeProv==0 & running<0)$exeAfter), m02gov_03d5$coef[1], m06gov_03d5a$power.rbc, m06gov_03d5b$power.rbc, m06gov_03d5c$power.rbc, m02gov_03d5$Nh[1], m06gov_03d5samp01$sampsi.h.l, m06gov_03d5samp02$sampsi.h.l, m06gov_03d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_03d5$Nh[2], m06gov_03d5samp01$sampsi.h.r, m06gov_03d5samp02$sampsi.h.r, m06gov_03d5samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$exeAfter), m02pj_03d5$coef[1], m06pj_03d5a$power.rbc, m06pj_03d5b$power.rbc, m06pj_03d5c$power.rbc, m02pj_03d5$Nh[1], m06pj_03d5samp01$sampsi.h.l, m06pj_03d5samp02$sampsi.h.l, m06pj_03d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_03d5$Nh[2], m06pj_03d5samp01$sampsi.h.r, m06pj_03d5samp02$sampsi.h.r, m06pj_03d5samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$exeAfter), m02ucr_03d5$coef[1], m06ucr_03d5a$power.rbc, m06ucr_03d5b$power.rbc, m06ucr_03d5c$power.rbc, m02ucr_03d5$Nh[1], m06ucr_03d5samp01$sampsi.h.l, m06ucr_03d5samp02$sampsi.h.l, m06ucr_03d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_03d5$Nh[2], m06ucr_03d5samp01$sampsi.h.r, m06ucr_03d5samp02$sampsi.h.r, m06ucr_03d5samp03$sampsi.h.r)
    
    # any position afterwards
    , c (sd (filter (base.g, largeProv==0 & running<0)$anyAfter), m02gov_05d5$coef[1], m06gov_04d5a$power.rbc, m06gov_04d5b$power.rbc, m06gov_04d5c$power.rbc, m02gov_05d5$Nh[1], m06gov_04d5samp01$sampsi.h.l, m06gov_04d5samp02$sampsi.h.l, m06gov_04d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_05d5$Nh[2], m06gov_04d5samp01$sampsi.h.r, m06gov_04d5samp02$sampsi.h.r, m06gov_04d5samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$anyAfter), m02pj_05d5$coef[1], m06pj_04d5a$power.rbc, m06pj_04d5b$power.rbc, m06pj_04d5c$power.rbc, m02pj_05d5$Nh[1], m06pj_04d5samp01$sampsi.h.l, m06pj_04d5samp02$sampsi.h.l, m06pj_04d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_05d5$Nh[2], m06pj_04d5samp01$sampsi.h.r, m06pj_04d5samp02$sampsi.h.r, m06pj_04d5samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$anyAfter), m02ucr_05d5$coef[1], m06ucr_04d5a$power.rbc, m06ucr_04d5b$power.rbc, m06ucr_04d5c$power.rbc, m02ucr_05d5$Nh[1], m06ucr_04d5samp01$sampsi.h.l, m06ucr_04d5samp02$sampsi.h.l, m06ucr_04d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_05d5$Nh[2], m06ucr_04d5samp01$sampsi.h.r, m06ucr_04d5samp02$sampsi.h.r, m06ucr_04d5samp03$sampsi.h.r)
    
    # terms served afterwards
    , c (sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq), m02gov_06d5$coef[1], m06gov_05d5a$power.rbc, m06gov_05d5b$power.rbc, m06gov_05d5c$power.rbc, m02gov_06d5$Nh[1], m06gov_05d5samp01$sampsi.h.l, m06gov_05d5samp02$sampsi.h.l, m06gov_05d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_06d5$Nh[2], m06gov_05d5samp01$sampsi.h.r, m06gov_05d5samp02$sampsi.h.r, m06gov_05d5samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq), m02pj_06d5$coef[1], m06pj_05d5a$power.rbc, m06pj_05d5b$power.rbc, m06pj_05d5c$power.rbc, m02pj_06d5$Nh[1], m06pj_05d5samp01$sampsi.h.l, m06pj_05d5samp02$sampsi.h.l, m06pj_05d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_06d5$Nh[2], m06pj_05d5samp01$sampsi.h.r, m06pj_05d5samp02$sampsi.h.r, m06pj_05d5samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq), m02ucr_06d5$coef[1], m06ucr_05d5a$power.rbc, m06ucr_05d5b$power.rbc, m06ucr_05d5c$power.rbc, m02ucr_06d5$Nh[1], m06ucr_05d5samp01$sampsi.h.l, m06ucr_05d5samp02$sampsi.h.l, m06ucr_05d5samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_06d5$Nh[2], m06ucr_05d5samp01$sampsi.h.r, m06ucr_05d5samp02$sampsi.h.r, m06ucr_05d5samp03$sampsi.h.r))))

(tabPower02b <- cbind (
  sprintf ("%.2f", tabPower02a[,1])
  , sprintf ("%.2f", tabPower02a[,2])
  , rep ("", nrow (tabPower02a))
  , sprintf ("%.2f", tabPower02a[,3])
  , sprintf ("%.2f", tabPower02a[,4])
  , sprintf ("%.2f", tabPower02a[,5])
  , rep ("", nrow (tabPower02a))
  , sprintf ("%.0f", tabPower02a[,6])
  , sprintf ("%.0f", tabPower02a[,7])
  , sprintf ("%.0f", tabPower02a[,8])
  , sprintf ("%.0f", tabPower02a[,9])
  , rep ("", nrow (tabPower02a))
  , sprintf ("%.2f", tabPower02a[,10])
  , sprintf ("%.2f", tabPower02a[,11])
  , rep ("", nrow (tabPower02a))
  , sprintf ("%.2f", tabPower02a[,12])
  , sprintf ("%.2f", tabPower02a[,13])
  , sprintf ("%.2f", tabPower02a[,14])
  , rep ("", nrow (tabPower02a))
  , sprintf ("%.0f", tabPower02a[,15])
  , sprintf ("%.0f", tabPower02a[,16])
  , sprintf ("%.0f", tabPower02a[,17])
  , sprintf ("%.0f", tabPower02a[,18])))
tabPower02b[tabPower02b=="NA"] <- ""

rows <- rep (c ("Governor's", "", "\\textsc{pj}", "", "\\textsc{ucr}", ""), 5)

Header1 <- paste ("\\toprule & \\multicolumn{11}{c}{(a) All provinces} & & \\multicolumn{11}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-12} \\cmidrule{14-24} \n")
Header2 <- paste ("& & & & \\multicolumn{3}{c}{power} & & \\multicolumn{4}{c}{sample size} & & & & & \\multicolumn{3}{c}{power} & & \\multicolumn{4}{c}{sample size} \\\\ \\cmidrule{5-7} \\cmidrule{9-12} \\cmidrule{17-19} \\cmidrule{21-24} \n")
Header3 <- paste ("& \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$\\hat{\\beta}$} & & \\multicolumn{1}{c}{$\\frac{\\text{\\textsc{sd}}_{C}}{2}$} & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$|\\hat{\\beta}|$} & & \\multicolumn{1}{c}{actual} & \\multicolumn{1}{c}{$\\frac{\\text{\\textsc{sd}}_{C}}{2}$} & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$|\\hat{\\beta}|$} & & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$\\hat{\\beta}$} & & \\multicolumn{1}{c}{$\\frac{\\text{\\textsc{sd}}_{C}}{2}$} & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$|\\hat{\\beta}|$} & & \\multicolumn{1}{c}{actual} & \\multicolumn{1}{c}{$\\frac{\\text{\\textsc{sd}}_{C}}{2}$} & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$|\\hat{\\beta}|$} \\\\ \\cmidrule{2-24} \n")
Header4 <- paste ("\\multicolumn{24}{l}{\\emph{renomination} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{24}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{24}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header7 <- paste ("[1.5ex] \\multicolumn{24}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header8 <- paste ("[1.5ex] \\multicolumn{24}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 0
addtorow$pos[[4]] <- 0
addtorow$pos[[5]] <- 6
addtorow$pos[[6]] <- 12
addtorow$pos[[7]] <- 18
addtorow$pos[[8]] <- 24
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6, Header7, Header8)
print (xtable (  cbind (rows, tabPower02b)
                 , align=c ("l","l","r","r","r","r","r","r","r","c","r","r","r","r","r","r","r","r","r","r","r","c","r","r","r")
                 , digits=2
                 , caption="Power and sample size calculations (2): Including controls"
                 , label="T:power02")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="footnotesize"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA05.tex")


### Table A6
(tabPower03a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (sd (filter (base.g, running<0)$renom), m02gov_01a7$coef[1], m06gov_01a7a$power.rbc, m06gov_01a7b$power.rbc, m06gov_01a7c$power.rbc, m02gov_01a7$Nh[1], m06gov_01a7samp01$sampsi.h.l, m06gov_01a7samp02$sampsi.h.l, m06gov_01a7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_01a7$Nh[2], m06gov_01a7samp01$sampsi.h.r, m06gov_01a7samp02$sampsi.h.r, m06gov_01a7samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$renom), m02pj_01a7$coef[1], m06pj_01a7a$power.rbc, m06pj_01a7b$power.rbc, m06pj_01a7c$power.rbc, m02pj_01a7$Nh[1], m06pj_01a7samp01$sampsi.h.l, m06pj_01a7samp02$sampsi.h.l, m06pj_01a7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_01a7$Nh[2], m06pj_01a7samp01$sampsi.h.r, m06pj_01a7samp02$sampsi.h.r, m06pj_01a7samp03$sampsi.h.r)
    , c (sd (filter (base.r, running<0)$renom), m02ucr_01a7$coef[1], m06ucr_01a7a$power.rbc, m06ucr_01a7b$power.rbc, m06ucr_01a7c$power.rbc, m02ucr_01a7$Nh[1], m06ucr_01a7samp01$sampsi.h.l, m06ucr_01a7samp02$sampsi.h.l, m06ucr_01a7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_01a7$Nh[2], m06ucr_01a7samp01$sampsi.h.r, m06ucr_01a7samp02$sampsi.h.r, m06ucr_01a7samp03$sampsi.h.r)
    
    # legislator afterwards
    , c (sd (filter (base.g, running<0)$legAfter), m02gov_02a7$coef[1], m06gov_02a7a$power.rbc, m06gov_02a7b$power.rbc, m06gov_02a7c$power.rbc, m02gov_02a7$Nh[1], m06gov_02a7samp01$sampsi.h.l, m06gov_02a7samp02$sampsi.h.l, m06gov_02a7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_02a7$Nh[2], m06gov_02a7samp01$sampsi.h.r, m06gov_02a7samp02$sampsi.h.r, m06gov_02a7samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$legAfter), m02pj_02a7$coef[1], m06pj_02a7a$power.rbc, m06pj_02a7b$power.rbc, m06pj_02a7c$power.rbc, m02pj_02a7$Nh[1], m06pj_02a7samp01$sampsi.h.l, m06pj_02a7samp02$sampsi.h.l, m06pj_02a7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_02a7$Nh[2], m06pj_02a7samp01$sampsi.h.r, m06pj_02a7samp02$sampsi.h.r, m06pj_02a7samp03$sampsi.h.r)
    , c (sd (filter (base.r, running<0)$legAfter), m02ucr_02a7$coef[1], m06ucr_02a7a$power.rbc, m06ucr_02a7b$power.rbc, m06ucr_02a7c$power.rbc, m02ucr_02a7$Nh[1], m06ucr_02a7samp01$sampsi.h.l, m06ucr_02a7samp02$sampsi.h.l, m06ucr_02a7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_02a7$Nh[2], m06ucr_02a7samp01$sampsi.h.r, m06ucr_02a7samp02$sampsi.h.r, m06ucr_02a7samp03$sampsi.h.r)
    
    # executive afterwards
    , c (sd (filter (base.g, running<0)$exeAfter), m02gov_03a7$coef[1], m06gov_03a7a$power.rbc, m06gov_03a7b$power.rbc, m06gov_03a7c$power.rbc, m02gov_03a7$Nh[1], m06gov_03a7samp01$sampsi.h.l, m06gov_03a7samp02$sampsi.h.l, m06gov_03a7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_03a7$Nh[2], m06gov_03a7samp01$sampsi.h.r, m06gov_03a7samp02$sampsi.h.r, m06gov_03a7samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$exeAfter), m02pj_03a7$coef[1], m06pj_03a7a$power.rbc, m06pj_03a7b$power.rbc, m06pj_03a7c$power.rbc, m02pj_03a7$Nh[1], m06pj_03a7samp01$sampsi.h.l, m06pj_03a7samp02$sampsi.h.l, NA)
    , c (rep (NA, 5), m02pj_03a7$Nh[2], m06pj_03a7samp01$sampsi.h.r, m06pj_03a7samp02$sampsi.h.r, NA)
    , c (sd (filter (base.r, running<0)$exeAfter), m02ucr_03a7$coef[1], m06ucr_03a7a$power.rbc, m06ucr_03a7b$power.rbc, m06ucr_03a7c$power.rbc, m02ucr_03a7$Nh[1], m06ucr_03a7samp01$sampsi.h.l, m06ucr_03a7samp02$sampsi.h.l, m06ucr_03a7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_03a7$Nh[2], m06ucr_03a7samp01$sampsi.h.r, m06ucr_03a7samp02$sampsi.h.r, m06ucr_03a7samp03$sampsi.h.r)
    
    # any position afterwards
    , c (sd (filter (base.g, running<0)$anyAfter), m02gov_05a7$coef[1], m06gov_04a7a$power.rbc, m06gov_04a7b$power.rbc, m06gov_04a7c$power.rbc, m02gov_05a7$Nh[1], m06gov_04a7samp01$sampsi.h.l, m06gov_04a7samp02$sampsi.h.l, m06gov_04a7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_05a7$Nh[2], m06gov_04a7samp01$sampsi.h.r, m06gov_04a7samp02$sampsi.h.r, m06gov_04a7samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$anyAfter), m02pj_05a7$coef[1], m06pj_04a7a$power.rbc, m06pj_04a7b$power.rbc, m06pj_04a7c$power.rbc, m02pj_05a7$Nh[1], m06pj_04a7samp01$sampsi.h.l, m06pj_04a7samp02$sampsi.h.l, m06pj_04a7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_05a7$Nh[2], m06pj_04a7samp01$sampsi.h.r, m06pj_04a7samp02$sampsi.h.r, m06pj_04a7samp03$sampsi.h.r)
    , c (sd (filter (base.r, running<0)$anyAfter), m02ucr_05a7$coef[1], m06ucr_04a7a$power.rbc, m06ucr_04a7b$power.rbc, m06ucr_04a7c$power.rbc, m02ucr_05a7$Nh[1], m06ucr_04a7samp01$sampsi.h.l, m06ucr_04a7samp02$sampsi.h.l, m06ucr_04a7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_05a7$Nh[2], m06ucr_04a7samp01$sampsi.h.r, m06ucr_04a7samp02$sampsi.h.r, m06ucr_04a7samp03$sampsi.h.r)
    
    # terms served afterwards
    , c (sd (filter (base.g, running<0)$valAfter.eq), m02gov_06a7$coef[1], m06gov_05a7a$power.rbc, m06gov_05a7b$power.rbc, m06gov_05a7c$power.rbc, m02gov_06a7$Nh[1], m06gov_05a7samp01$sampsi.h.l, m06gov_05a7samp02$sampsi.h.l, m06gov_05a7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_06a7$Nh[2], m06gov_05a7samp01$sampsi.h.r, m06gov_05a7samp02$sampsi.h.r, m06gov_05a7samp03$sampsi.h.r)
    , c (sd (filter (base.p, running<0)$valAfter.eq), m02pj_06a7$coef[1], m06pj_05a7a$power.rbc, m06pj_05a7b$power.rbc, m06pj_05a7c$power.rbc, m02pj_06a7$Nh[1], m06pj_05a7samp01$sampsi.h.l, m06pj_05a7samp02$sampsi.h.l, m06pj_05a7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_06a7$Nh[2], m06pj_05a7samp01$sampsi.h.r, m06pj_05a7samp02$sampsi.h.r, m06pj_05a7samp03$sampsi.h.r)
    , c (sd (filter (base.r, running<0)$valAfter.eq), m02ucr_06a7$coef[1], m06ucr_05a7a$power.rbc, m06ucr_05a7b$power.rbc, m06ucr_05a7c$power.rbc, m02ucr_06a7$Nh[1], m06ucr_05a7samp01$sampsi.h.l, m06ucr_05a7samp02$sampsi.h.l, m06ucr_05a7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_06a7$Nh[2], m06ucr_05a7samp01$sampsi.h.r, m06ucr_05a7samp02$sampsi.h.r, m06ucr_05a7samp03$sampsi.h.r)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (sd (filter (base.g, largeProv==0 & running<0)$renom), m02gov_01d7$coef[1], m06gov_01d7a$power.rbc, m06gov_01d7b$power.rbc, m06gov_01d7c$power.rbc, m02gov_01d7$Nh[1], m06gov_01d7samp01$sampsi.h.l, m06gov_01d7samp02$sampsi.h.l, m06gov_01d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_01d7$Nh[2], m06gov_01d7samp01$sampsi.h.r, m06gov_01d7samp02$sampsi.h.r, m06gov_01d7samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$renom), m02pj_01d7$coef[1], m06pj_01d7a$power.rbc, m06pj_01d7b$power.rbc, m06pj_01d7c$power.rbc, m02pj_01d7$Nh[1], m06pj_01d7samp01$sampsi.h.l, m06pj_01d7samp02$sampsi.h.l, m06pj_01d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_01d7$Nh[2], m06pj_01d7samp01$sampsi.h.r, m06pj_01d7samp02$sampsi.h.r, m06pj_01d7samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$renom), m02ucr_01d7$coef[1], m06ucr_01d7a$power.rbc, m06ucr_01d7b$power.rbc, m06ucr_01d7c$power.rbc, m02ucr_01d7$Nh[1], m06ucr_01d7samp01$sampsi.h.l, m06ucr_01d7samp02$sampsi.h.l, m06ucr_01d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_01d7$Nh[2], m06ucr_01d7samp01$sampsi.h.r, m06ucr_01d7samp02$sampsi.h.r, m06ucr_01d7samp03$sampsi.h.r)
    
    # legislator afterwards
    , c (sd (filter (base.g, largeProv==0 & running<0)$legAfter), m02gov_02d7$coef[1], m06gov_02d7a$power.rbc, m06gov_02d7b$power.rbc, m06gov_02d7c$power.rbc, m02gov_02d7$Nh[1], m06gov_02d7samp01$sampsi.h.l, m06gov_02d7samp02$sampsi.h.l, m06gov_02d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_02d7$Nh[2], m06gov_02d7samp01$sampsi.h.r, m06gov_02d7samp02$sampsi.h.r, m06gov_02d7samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$legAfter), m02pj_02d7$coef[1], m06pj_02d7a$power.rbc, m06pj_02d7b$power.rbc, m06pj_02d7c$power.rbc, m02pj_02d7$Nh[1], m06pj_02d7samp01$sampsi.h.l, m06pj_02d7samp02$sampsi.h.l, m06pj_02d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_02d7$Nh[2], m06pj_02d7samp01$sampsi.h.r, m06pj_02d7samp02$sampsi.h.r, m06pj_02d7samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$legAfter), m02ucr_02d7$coef[1], m06ucr_02d7a$power.rbc, m06ucr_02d7b$power.rbc, m06ucr_02d7c$power.rbc, m02ucr_02d7$Nh[1], m06ucr_02d7samp01$sampsi.h.l, m06ucr_02d7samp02$sampsi.h.l, m06ucr_02d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_02d7$Nh[2], m06ucr_02d7samp01$sampsi.h.r, m06ucr_02d7samp02$sampsi.h.r, m06ucr_02d7samp03$sampsi.h.r)
    
    # executive afterwards
    , c (sd (filter (base.g, largeProv==0 & running<0)$exeAfter), m02gov_03d7$coef[1], m06gov_03d7a$power.rbc, m06gov_03d7b$power.rbc, m06gov_03d7c$power.rbc, m02gov_03d7$Nh[1], m06gov_03d7samp01$sampsi.h.l, m06gov_03d7samp02$sampsi.h.l, m06gov_03d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_03d7$Nh[2], m06gov_03d7samp01$sampsi.h.r, m06gov_03d7samp02$sampsi.h.r, m06gov_03d7samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$exeAfter), m02pj_03d7$coef[1], m06pj_03d7a$power.rbc, m06pj_03d7b$power.rbc, m06pj_03d7c$power.rbc, m02pj_03d7$Nh[1], m06pj_03d7samp01$sampsi.h.l, m06pj_03d7samp02$sampsi.h.l, m06pj_03d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_03d7$Nh[2], m06pj_03d7samp01$sampsi.h.r, m06pj_03d7samp02$sampsi.h.r, m06pj_03d7samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$exeAfter), m02ucr_03d7$coef[1], m06ucr_03d7a$power.rbc, m06ucr_03d7b$power.rbc, m06ucr_03d7c$power.rbc, m02ucr_03d7$Nh[1], m06ucr_03d7samp01$sampsi.h.l, m06ucr_03d7samp02$sampsi.h.l, m06ucr_03d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_03d7$Nh[2], m06ucr_03d7samp01$sampsi.h.r, m06ucr_03d7samp02$sampsi.h.r, m06ucr_03d7samp03$sampsi.h.r)
    
    # any position afterwards
    , c (sd (filter (base.g, largeProv==0 & running<0)$anyAfter), m02gov_05d7$coef[1], m06gov_04d7a$power.rbc, m06gov_04d7b$power.rbc, m06gov_04d7c$power.rbc, m02gov_05d7$Nh[1], m06gov_04d7samp01$sampsi.h.l, m06gov_04d7samp02$sampsi.h.l, m06gov_04d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_05d7$Nh[2], m06gov_04d7samp01$sampsi.h.r, m06gov_04d7samp02$sampsi.h.r, m06gov_04d7samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$anyAfter), m02pj_05d7$coef[1], m06pj_04d7a$power.rbc, m06pj_04d7b$power.rbc, m06pj_04d7c$power.rbc, m02pj_05d7$Nh[1], m06pj_04d7samp01$sampsi.h.l, m06pj_04d7samp02$sampsi.h.l, m06pj_04d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_05d7$Nh[2], m06pj_04d7samp01$sampsi.h.r, m06pj_04d7samp02$sampsi.h.r, m06pj_04d7samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$anyAfter), m02ucr_05d7$coef[1], m06ucr_04d7a$power.rbc, m06ucr_04d7b$power.rbc, m06ucr_04d7c$power.rbc, m02ucr_05d7$Nh[1], m06ucr_04d7samp01$sampsi.h.l, m06ucr_04d7samp02$sampsi.h.l, m06ucr_04d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_05d7$Nh[2], m06ucr_04d7samp01$sampsi.h.r, m06ucr_04d7samp02$sampsi.h.r, m06ucr_04d7samp03$sampsi.h.r)
    
    # terms served afterwards
    , c (sd (filter (base.g, largeProv==0 & running<0)$valAfter.eq), m02gov_06d7$coef[1], m06gov_05d7a$power.rbc, m06gov_05d7b$power.rbc, m06gov_05d7c$power.rbc, m02gov_06d7$Nh[1], m06gov_05d7samp01$sampsi.h.l, m06gov_05d7samp02$sampsi.h.l, m06gov_05d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02gov_06d7$Nh[2], m06gov_05d7samp01$sampsi.h.r, m06gov_05d7samp02$sampsi.h.r, m06gov_05d7samp03$sampsi.h.r)
    , c (sd (filter (base.p, largeProv==0 & running<0)$valAfter.eq), m02pj_06d7$coef[1], m06pj_05d7a$power.rbc, m06pj_05d7b$power.rbc, m06pj_05d7c$power.rbc, m02pj_06d7$Nh[1], m06pj_05d7samp01$sampsi.h.l, m06pj_05d7samp02$sampsi.h.l, m06pj_05d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02pj_06d7$Nh[2], m06pj_05d7samp01$sampsi.h.r, m06pj_05d7samp02$sampsi.h.r, m06pj_05d7samp03$sampsi.h.r)
    , c (sd (filter (base.r, largeProv==0 & running<0)$valAfter.eq), m02ucr_06d7$coef[1], m06ucr_05d7a$power.rbc, m06ucr_05d7b$power.rbc, m06ucr_05d7c$power.rbc, m02ucr_06d7$Nh[1], m06ucr_05d7samp01$sampsi.h.l, m06ucr_05d7samp02$sampsi.h.l, m06ucr_05d7samp03$sampsi.h.l)
    , c (rep (NA, 5), m02ucr_06d7$Nh[2], m06ucr_05d7samp01$sampsi.h.r, m06ucr_05d7samp02$sampsi.h.r, m06ucr_05d7samp03$sampsi.h.r))))

(tabPower03b <- cbind (
  sprintf ("%.2f", tabPower03a[,1])
  , sprintf ("%.2f", tabPower03a[,2])
  , rep ("", nrow (tabPower03a))
  , sprintf ("%.2f", tabPower03a[,3])
  , sprintf ("%.2f", tabPower03a[,4])
  , sprintf ("%.2f", tabPower03a[,5])
  , rep ("", nrow (tabPower03a))
  , sprintf ("%.0f", tabPower03a[,6])
  , sprintf ("%.0f", tabPower03a[,7])
  , sprintf ("%.0f", tabPower03a[,8])
  , sprintf ("%.0f", tabPower03a[,9])
  , rep ("", nrow (tabPower03a))
  , sprintf ("%.2f", tabPower03a[,10])
  , sprintf ("%.2f", tabPower03a[,11])
  , rep ("", nrow (tabPower03a))
  , sprintf ("%.2f", tabPower03a[,12])
  , sprintf ("%.2f", tabPower03a[,13])
  , sprintf ("%.2f", tabPower03a[,14])
  , rep ("", nrow (tabPower03a))
  , sprintf ("%.0f", tabPower03a[,15])
  , sprintf ("%.0f", tabPower03a[,16])
  , sprintf ("%.0f", tabPower03a[,17])
  , sprintf ("%.0f", tabPower03a[,18])))
tabPower03b[tabPower03b=="NA"] <- ""

rows <- rep (c ("Governor's", "", "\\textsc{pj}", "", "\\textsc{ucr}", ""), 5)

Header1 <- paste ("\\toprule & \\multicolumn{11}{c}{(a) All provinces} & & \\multicolumn{11}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-12} \\cmidrule{14-24} \n")
Header2 <- paste ("& & & & \\multicolumn{3}{c}{power} & & \\multicolumn{4}{c}{sample size} & & & & & \\multicolumn{3}{c}{power} & & \\multicolumn{4}{c}{sample size} \\\\ \\cmidrule{5-7} \\cmidrule{9-12} \\cmidrule{17-19} \\cmidrule{21-24} \n")
Header3 <- paste ("& \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$\\hat{\\beta}$} & & \\multicolumn{1}{c}{$\\frac{\\text{\\textsc{sd}}_{C}}{2}$} & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$|\\hat{\\beta}|$} & & \\multicolumn{1}{c}{actual} & \\multicolumn{1}{c}{$\\frac{\\text{\\textsc{sd}}_{C}}{2}$} & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$|\\hat{\\beta}|$} & & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$\\hat{\\beta}$} & & \\multicolumn{1}{c}{$\\frac{\\text{\\textsc{sd}}_{C}}{2}$} & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$|\\hat{\\beta}|$} & & \\multicolumn{1}{c}{actual} & \\multicolumn{1}{c}{$\\frac{\\text{\\textsc{sd}}_{C}}{2}$} & \\multicolumn{1}{c}{\\textsc{sd}$_{C}$} & \\multicolumn{1}{c}{$|\\hat{\\beta}|$} \\\\ \\cmidrule{2-24} \n")
Header4 <- paste ("\\multicolumn{24}{l}{\\emph{renomination} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{24}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{24}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header7 <- paste ("[1.5ex] \\multicolumn{24}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header8 <- paste ("[1.5ex] \\multicolumn{24}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 0
addtorow$pos[[4]] <- 0
addtorow$pos[[5]] <- 6
addtorow$pos[[6]] <- 12
addtorow$pos[[7]] <- 18
addtorow$pos[[8]] <- 24
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6, Header7, Header8)
print (xtable (  cbind (rows, tabPower03b)
                 , align=c ("l","l","r","r","r","r","r","r","r","c","r","r","r","r","r","r","r","r","r","r","r","c","r","r","r")
                 , digits=2
                 , caption="Power and sample size calculations (3): Second-order polynomial"
                 , label="T:power03")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="footnotesize"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA06.tex")



### Table A7
(tabRob05a <- cbind (
  
  ## all provinces
  rbind (
    
    # mayor afterwards
    c (m02gov_07a4$coef[1], m02gov_07a4$ci[3,], m02gov_07a4$pv[3], m02gov_07a4$bws[1,1], m02gov_07a4$Nh)
    , c (m02pj_07a4$coef[1], m02pj_07a4$ci[3,], m02pj_07a4$pv[3], m02pj_07a4$bws[1,1], m02pj_07a4$Nh)
    , c (m02ucr_07a4$coef[1], m02ucr_07a4$ci[3,], m02ucr_07a4$pv[3], m02ucr_07a4$bws[1,1], m02ucr_07a4$Nh)
    
    # (vice-)president, (vice-)governor or national minister afterwards
    , c (m02gov_09a4$coef[1], m02gov_09a4$ci[3,], m02gov_09a4$pv[3], m02gov_09a4$bws[1,1], m02gov_09a4$Nh)
    , c (m02pj_09a4$coef[1], m02pj_09a4$ci[3,], m02pj_09a4$pv[3], m02pj_09a4$bws[1,1], m02pj_09a4$Nh)
    , c (m02ucr_09a4$coef[1], m02ucr_09a4$ci[3,], m02ucr_09a4$pv[3], m02ucr_09a4$bws[1,1], m02ucr_09a4$Nh)
    
    # equally valuable afterwards
    , c (m02gov_08a4$coef[1], m02gov_08a4$ci[3,], m02gov_08a4$pv[3], m02gov_08a4$bws[1,1], m02gov_08a4$Nh)
    , c (m02pj_08a4$coef[1], m02pj_08a4$ci[3,], m02pj_08a4$pv[3], m02pj_08a4$bws[1,1], m02pj_08a4$Nh)
    , c (m02ucr_08a4$coef[1], m02ucr_08a4$ci[3,], m02ucr_08a4$pv[3], m02ucr_08a4$bws[1,1], m02ucr_08a4$Nh)
    
    # better position afterwards
    , c (m02gov_05a4$coef[1], m02gov_05a4$ci[3,], m02gov_05a4$pv[3], m02gov_05a4$bws[1,1], m02gov_05a4$Nh)
    , c (m02pj_05a4$coef[1], m02pj_05a4$ci[3,], m02pj_05a4$pv[3], m02pj_05a4$bws[1,1], m02pj_05a4$Nh)
    , c (m02ucr_05a4$coef[1], m02ucr_05a4$ci[3,], m02ucr_05a4$pv[3], m02ucr_05a4$bws[1,1], m02ucr_05a4$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # mayor afterwards
    c (m02gov_07d4$coef[1], m02gov_07d4$ci[3,], m02gov_07d4$pv[3], m02gov_07d4$bws[1,1], m02gov_07d4$Nh)
    , c (m02pj_07d4$coef[1], m02pj_07d4$ci[3,], m02pj_07d4$pv[3], m02pj_07d4$bws[1,1], m02pj_07d4$Nh)
    , c (m02ucr_07d4$coef[1], m02ucr_07d4$ci[3,], m02ucr_07d4$pv[3], m02ucr_07d4$bws[1,1], m02ucr_07d4$Nh)
    
    # (vice-)president, (vice-)governor or national minister afterwards
    , c (m02gov_09d4$coef[1], m02gov_09d4$ci[3,], m02gov_09d4$pv[3], m02gov_09d4$bws[1,1], m02gov_09d4$Nh)
    , c (m02pj_09d4$coef[1], m02pj_09d4$ci[3,], m02pj_09d4$pv[3], m02pj_09d4$bws[1,1], m02pj_09d4$Nh)
    , c (m02ucr_09d4$coef[1], m02ucr_09d4$ci[3,], m02ucr_09d4$pv[3], m02ucr_09d4$bws[1,1], m02ucr_09d4$Nh)
    
    # equally valuable afterwards
    , c (m02gov_08d4$coef[1], m02gov_08d4$ci[3,], m02gov_08d4$pv[3], m02gov_08d4$bws[1,1], m02gov_08d4$Nh)
    , c (m02pj_08d4$coef[1], m02pj_08d4$ci[3,], m02pj_08d4$pv[3], m02pj_08d4$bws[1,1], m02pj_08d4$Nh)
    , c (m02ucr_08d4$coef[1], m02ucr_08d4$ci[3,], m02ucr_08d4$pv[3], m02ucr_08d4$bws[1,1], m02ucr_08d4$Nh)
    
    # better position afterwards
    , c (m02gov_05d4$coef[1], m02gov_05d4$ci[3,], m02gov_05d4$pv[3], m02gov_05d4$bws[1,1], m02gov_05d4$Nh)
    , c (m02pj_05d4$coef[1], m02pj_05d4$ci[3,], m02pj_05d4$pv[3], m02pj_05d4$bws[1,1], m02pj_05d4$Nh)
    , c (m02ucr_05d4$coef[1], m02ucr_05d4$ci[3,], m02ucr_05d4$pv[3], m02ucr_05d4$bws[1,1], m02ucr_05d4$Nh))))
(tabRob05b <- cbind (
  sprintf ("%.2f", tabRob05a[,1])
  , paste ("[", sprintf ("%.2f", tabRob05a[,2]), ":", sprintf ("%.2f", tabRob05a[,3]), "]", sep="")
  , sprintf ("%.2f", tabRob05a[,4])
  , sprintf ("%.2f", tabRob05a[,5])
  , paste (sprintf ("%.0f", tabRob05a[,6]), "$|$", sprintf ("%.0f", tabRob05a[,7]), sep="")
  , rep ("", nrow (tabRob05a))
  , sprintf ("%.2f", tabRob05a[,8])
  , paste ("[", sprintf ("%.2f", tabRob05a[,9]), ":", sprintf ("%.2f", tabRob05a[,10]), "]", sep="")
  , sprintf ("%.2f", tabRob05a[,11])
  , sprintf ("%.2f", tabRob05a[,12])
  , paste (sprintf ("%.0f", tabRob05a[,13]), "$|$", sprintf ("%.0f", tabRob05a[,14]), sep="")))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 4)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{mayor (after)} (0/1)} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{executive other than mayor (after)} (0/1)} \\\\ \\midrule \n")
Header4 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{equivalent position (after)} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{better position (after)} (0/1)} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$pos[[4]] <- 6
addtorow$pos[[5]] <- 9
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5)
print (xtable (  cbind (rows, tabRob05b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="Additional results (1): Alternative measures of career success"
                 , label="T:Rob05outcomes")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="small"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA07.tex")


### Table A8

# getting the sample sizes
nrow (base.g); nrow (base.g[base.g$anyBefore==0,]); nrow (base.g[base.g$anyBefore==1,])
nrow (base.p); nrow (base.p[base.p$anyBefore==0,]); nrow (base.p[base.p$anyBefore==1,])
nrow (base.r); nrow (base.r[base.r$anyBefore==0,]); nrow (base.r[base.r$anyBefore==1,]) ## it makes no sense to look at experienced candidates only

nrow (base.g[base.g$anyBefore==0 & base.g$running<0,]); nrow (base.g[base.g$anyBefore==0 & base.g$running>0,]); nrow (base.g[base.g$anyBefore==0,])
nrow (base.p[base.p$anyBefore==0 & base.p$running<0,]); nrow (base.p[base.p$anyBefore==0 & base.p$running>0,]); nrow (base.p[base.p$anyBefore==0,])
nrow (base.r[base.r$anyBefore==0 & base.r$running<0,]); nrow (base.r[base.r$anyBefore==0 & base.r$running>0,]); nrow (base.r[base.r$anyBefore==0,])
nrow (base.g[base.g$largeProv==0 & base.g$anyBefore==0 & base.g$running<0,]); nrow (base.g[base.g$largeProv==0 & base.g$anyBefore==0 & base.g$running>0,]); nrow (base.g[base.g$largeProv==0 & base.g$anyBefore==0,])
nrow (base.p[base.p$largeProv==0 & base.p$anyBefore==0 & base.p$running<0,]); nrow (base.p[base.p$largeProv==0 & base.p$anyBefore==0 & base.p$running>0,]); nrow (base.p[base.p$largeProv==0 & base.p$anyBefore==0,])
nrow (base.r[base.r$largeProv==0 & base.r$anyBefore==0 & base.r$running<0,]); nrow (base.r[base.r$largeProv==0 & base.r$anyBefore==0 & base.r$running>0,]); nrow (base.r[base.r$largeProv==0 & base.r$anyBefore==0,])

# building the table
(tabRob07a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01g4$coef[1], m02gov_01g4$ci[3,], m02gov_01g4$pv[3], m02gov_01g4$bws[1,1], m02gov_01g4$Nh)
    , c (m02pj_01g4$coef[1], m02pj_01g4$ci[3,], m02pj_01g4$pv[3], m02pj_01g4$bws[1,1], m02pj_01g4$Nh)
    , c (m02ucr_01g4$coef[1], m02ucr_01g4$ci[3,], m02ucr_01g4$pv[3], m02ucr_01g4$bws[1,1], m02ucr_01g4$Nh)
    
    # legislator afterwards
    , c (m02gov_02g4$coef[1], m02gov_02g4$ci[3,], m02gov_02g4$pv[3], m02gov_02g4$bws[1,1], m02gov_02g4$Nh)
    , c (m02pj_02g4$coef[1], m02pj_02g4$ci[3,], m02pj_02g4$pv[3], m02pj_02g4$bws[1,1], m02pj_02g4$Nh)
    , c (m02ucr_02g4$coef[1], m02ucr_02g4$ci[3,], m02ucr_02g4$pv[3], m02ucr_02g4$bws[1,1], m02ucr_02g4$Nh)
    
    # executive afterwards
    , c (m02gov_03g4$coef[1], m02gov_03g4$ci[3,], m02gov_03g4$pv[3], m02gov_03g4$bws[1,1], m02gov_03g4$Nh)
    , c (m02pj_03g4$coef[1], m02pj_03g4$ci[3,], m02pj_03g4$pv[3], m02pj_03g4$bws[1,1], m02pj_03g4$Nh)
    , c (m02ucr_03g4$coef[1], m02ucr_03g4$ci[3,], m02ucr_03g4$pv[3], m02ucr_03g4$bws[1,1], m02ucr_03g4$Nh)
    
    # any position afterwards
    , c (m02gov_05g4$coef[1], m02gov_05g4$ci[3,], m02gov_05g4$pv[3], m02gov_05g4$bws[1,1], m02gov_05g4$Nh)
    , c (m02pj_05g4$coef[1], m02pj_05g4$ci[3,], m02pj_05g4$pv[3], m02pj_05g4$bws[1,1], m02pj_05g4$Nh)
    , c (m02ucr_05g4$coef[1], m02ucr_05g4$ci[3,], m02ucr_05g4$pv[3], m02ucr_05g4$bws[1,1], m02ucr_05g4$Nh)
    
    # terms served afterwards
    , c (m02gov_06g4$coef[1], m02gov_06g4$ci[3,], m02gov_06g4$pv[3], m02gov_06g4$bws[1,1], m02gov_06g4$Nh)
    , c (m02pj_06g4$coef[1], m02pj_06g4$ci[3,], m02pj_06g4$pv[3], m02pj_06g4$bws[1,1], m02pj_06g4$Nh)
    , c (m02ucr_06g4$coef[1], m02ucr_06g4$ci[3,], m02ucr_06g4$pv[3], m02ucr_06g4$bws[1,1], m02ucr_06g4$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01j4$coef[1], m02gov_01j4$ci[3,], m02gov_01j4$pv[3], m02gov_01j4$bws[1,1], m02gov_01j4$Nh)
    , c (m02pj_01j4$coef[1], m02pj_01j4$ci[3,], m02pj_01j4$pv[3], m02pj_01j4$bws[1,1], m02pj_01j4$Nh)
    , c (m02ucr_01j4$coef[1], m02ucr_01j4$ci[3,], m02ucr_01j4$pv[3], m02ucr_01j4$bws[1,1], m02ucr_01j4$Nh)
    
    # legislator afterwards
    , c (m02gov_02j4$coef[1], m02gov_02j4$ci[3,], m02gov_02j4$pv[3], m02gov_02j4$bws[1,1], m02gov_02j4$Nh)
    , c (m02pj_02j4$coef[1], m02pj_02j4$ci[3,], m02pj_02j4$pv[3], m02pj_02j4$bws[1,1], m02pj_02j4$Nh)
    , c (m02ucr_02j4$coef[1], m02ucr_02j4$ci[3,], m02ucr_02j4$pv[3], m02ucr_02j4$bws[1,1], m02ucr_02j4$Nh)
    
    # executive afterwards
    , c (m02gov_03j4$coef[1], m02gov_03j4$ci[3,], m02gov_03j4$pv[3], m02gov_03j4$bws[1,1], m02gov_03j4$Nh)
    , c (m02pj_03j4$coef[1], m02pj_03j4$ci[3,], m02pj_03j4$pv[3], m02pj_03j4$bws[1,1], m02pj_03j4$Nh)
    , c (m02ucr_03j4$coef[1], m02ucr_03j4$ci[3,], m02ucr_03j4$pv[3], m02ucr_03j4$bws[1,1], m02ucr_03j4$Nh)
    
    # any position afterwards
    , c (m02gov_05j4$coef[1], m02gov_05j4$ci[3,], m02gov_05j4$pv[3], m02gov_05j4$bws[1,1], m02gov_05j4$Nh)
    , c (m02pj_05j4$coef[1], m02pj_05j4$ci[3,], m02pj_05j4$pv[3], m02pj_05j4$bws[1,1], m02pj_05j4$Nh)
    , c (m02ucr_05j4$coef[1], m02ucr_05j4$ci[3,], m02ucr_05j4$pv[3], m02ucr_05j4$bws[1,1], m02ucr_05j4$Nh)
    
    # terms served afterwards
    , c (m02gov_06j4$coef[1], m02gov_06j4$ci[3,], m02gov_06j4$pv[3], m02gov_06j4$bws[1,1], m02gov_06j4$Nh)
    , c (m02pj_06j4$coef[1], m02pj_06j4$ci[3,], m02pj_06j4$pv[3], m02pj_06j4$bws[1,1], m02pj_06j4$Nh)
    , c (m02ucr_06j4$coef[1], m02ucr_06j4$ci[3,], m02ucr_06j4$pv[3], m02ucr_06j4$bws[1,1], m02ucr_06j4$Nh))))
(tabRob07b <- cbind (
  sprintf ("%.2f", tabRob07a[,1])
  , paste ("[", sprintf ("%.2f", tabRob07a[,2]), ":", sprintf ("%.2f", tabRob07a[,3]), "]", sep="")
  , sprintf ("%.2f", tabRob07a[,4])
  , sprintf ("%.2f", tabRob07a[,5])
  , paste (sprintf ("%.0f", tabRob07a[,6]), "$|$", sprintf ("%.0f", tabRob07a[,7]), sep="")
  , rep ("", nrow (tabRob07a))
  , sprintf ("%.2f", tabRob07a[,8])
  , paste ("[", sprintf ("%.2f", tabRob07a[,9]), ":", sprintf ("%.2f", tabRob07a[,10]), "]", sep="")
  , sprintf ("%.2f", tabRob07a[,11])
  , sprintf ("%.2f", tabRob07a[,12])
  , paste (sprintf ("%.0f", tabRob07a[,13]), "$|$", sprintf ("%.0f", tabRob07a[,14]), sep="")
))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 5)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{renomination} (0/1)} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header4 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$pos[[4]] <- 6
addtorow$pos[[5]] <- 9
addtorow$pos[[6]] <- 12
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6)
print (xtable (  cbind (rows, tabRob07b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="Additional results (2): Candidates with no previous executive or national legislative experience"
                 , label="T:Rob07unexp")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="small"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA08.tex")


### Table A9

# getting the sample sizes
nrow (base.g); nrow (base.g[base.g$firstTitular==0,]); nrow (base.g[base.g$firstTitular==1,])
nrow (base.p); nrow (base.p[base.p$firstTitular==0,]); nrow (base.p[base.p$firstTitular==1,])
nrow (base.r); nrow (base.r[base.r$firstTitular==0,]); nrow (base.r[base.r$firstTitular==1,]) ## it makes no sense to look at experienced candidates only

nrow (base.g[base.g$firstTitular==1 & base.g$running<0,]); nrow (base.g[base.g$firstTitular==1 & base.g$running>0,]); nrow (base.g[base.g$firstTitular==1,])
nrow (base.p[base.p$firstTitular==1 & base.p$running<0,]); nrow (base.p[base.p$firstTitular==1 & base.p$running>0,]); nrow (base.p[base.p$firstTitular==1,])
nrow (base.r[base.r$firstTitular==1 & base.r$running<0,]); nrow (base.r[base.r$firstTitular==1 & base.r$running>0,]); nrow (base.r[base.r$firstTitular==1,])
nrow (base.g[base.g$largeProv==0 & base.g$firstTitular==1 & base.g$running<0,]); nrow (base.g[base.g$largeProv==0 & base.g$firstTitular==1 & base.g$running>0,]); nrow (base.g[base.g$largeProv==0 & base.g$firstTitular==1,])
nrow (base.p[base.p$largeProv==0 & base.p$firstTitular==1 & base.p$running<0,]); nrow (base.p[base.p$largeProv==0 & base.p$firstTitular==1 & base.p$running>0,]); nrow (base.p[base.p$largeProv==0 & base.p$firstTitular==1,])
nrow (base.r[base.r$largeProv==0 & base.r$firstTitular==1 & base.r$running<0,]); nrow (base.r[base.r$largeProv==0 & base.r$firstTitular==1 & base.r$running>0,]); nrow (base.r[base.r$largeProv==0 & base.r$firstTitular==1,])

# building the table
(tabRob08a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01aa4$coef[1], m02gov_01aa4$ci[3,], m02gov_01aa4$pv[3], m02gov_01aa4$bws[1,1], m02gov_01aa4$Nh)
    , c (m02pj_01aa4$coef[1], m02pj_01aa4$ci[3,], m02pj_01aa4$pv[3], m02pj_01aa4$bws[1,1], m02pj_01aa4$Nh)
    , c (m02ucr_01aa4$coef[1], m02ucr_01aa4$ci[3,], m02ucr_01aa4$pv[3], m02ucr_01aa4$bws[1,1], m02ucr_01aa4$Nh)
    
    # legislator afterwards
    , c (m02gov_02aa4$coef[1], m02gov_02aa4$ci[3,], m02gov_02aa4$pv[3], m02gov_02aa4$bws[1,1], m02gov_02aa4$Nh)
    , c (m02pj_02aa4$coef[1], m02pj_02aa4$ci[3,], m02pj_02aa4$pv[3], m02pj_02aa4$bws[1,1], m02pj_02aa4$Nh)
    , c (m02ucr_02aa4$coef[1], m02ucr_02aa4$ci[3,], m02ucr_02aa4$pv[3], m02ucr_02aa4$bws[1,1], m02ucr_02aa4$Nh)
    
    # executive afterwards
    , c (m02gov_03aa4$coef[1], m02gov_03aa4$ci[3,], m02gov_03aa4$pv[3], m02gov_03aa4$bws[1,1], m02gov_03aa4$Nh)
    , c (m02pj_03aa4$coef[1], m02pj_03aa4$ci[3,], m02pj_03aa4$pv[3], m02pj_03aa4$bws[1,1], m02pj_03aa4$Nh)
    , c (m02ucr_03aa4$coef[1], m02ucr_03aa4$ci[3,], m02ucr_03aa4$pv[3], m02ucr_03aa4$bws[1,1], m02ucr_03aa4$Nh)
    
    # any position afterwards
    , c (m02gov_05aa4$coef[1], m02gov_05aa4$ci[3,], m02gov_05aa4$pv[3], m02gov_05aa4$bws[1,1], m02gov_05aa4$Nh)
    , c (m02pj_05aa4$coef[1], m02pj_05aa4$ci[3,], m02pj_05aa4$pv[3], m02pj_05aa4$bws[1,1], m02pj_05aa4$Nh)
    , c (m02ucr_05aa4$coef[1], m02ucr_05aa4$ci[3,], m02ucr_05aa4$pv[3], m02ucr_05aa4$bws[1,1], m02ucr_05aa4$Nh)
    
    # terms served afterwards
    , c (m02gov_06aa4$coef[1], m02gov_06aa4$ci[3,], m02gov_06aa4$pv[3], m02gov_06aa4$bws[1,1], m02gov_06aa4$Nh)
    , c (m02pj_06aa4$coef[1], m02pj_06aa4$ci[3,], m02pj_06aa4$pv[3], m02pj_06aa4$bws[1,1], m02pj_06aa4$Nh)
    , c (m02ucr_06aa4$coef[1], m02ucr_06aa4$ci[3,], m02ucr_06aa4$pv[3], m02ucr_06aa4$bws[1,1], m02ucr_06aa4$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01ad4$coef[1], m02gov_01ad4$ci[3,], m02gov_01ad4$pv[3], m02gov_01ad4$bws[1,1], m02gov_01ad4$Nh)
    , c (m02pj_01ad4$coef[1], m02pj_01ad4$ci[3,], m02pj_01ad4$pv[3], m02pj_01ad4$bws[1,1], m02pj_01ad4$Nh)
    , c (m02ucr_01ad4$coef[1], m02ucr_01ad4$ci[3,], m02ucr_01ad4$pv[3], m02ucr_01ad4$bws[1,1], m02ucr_01ad4$Nh)
    
    # legislator afterwards
    , c (m02gov_02ad4$coef[1], m02gov_02ad4$ci[3,], m02gov_02ad4$pv[3], m02gov_02ad4$bws[1,1], m02gov_02ad4$Nh)
    , c (m02pj_02ad4$coef[1], m02pj_02ad4$ci[3,], m02pj_02ad4$pv[3], m02pj_02ad4$bws[1,1], m02pj_02ad4$Nh)
    , c (m02ucr_02ad4$coef[1], m02ucr_02ad4$ci[3,], m02ucr_02ad4$pv[3], m02ucr_02ad4$bws[1,1], m02ucr_02ad4$Nh)
    
    # executive afterwards
    , c (m02gov_03ad4$coef[1], m02gov_03ad4$ci[3,], m02gov_03ad4$pv[3], m02gov_03ad4$bws[1,1], m02gov_03ad4$Nh)
    , c (m02pj_03ad4$coef[1], m02pj_03ad4$ci[3,], m02pj_03ad4$pv[3], m02pj_03ad4$bws[1,1], m02pj_03ad4$Nh)
    , c (m02ucr_03ad4$coef[1], m02ucr_03ad4$ci[3,], m02ucr_03ad4$pv[3], m02ucr_03ad4$bws[1,1], m02ucr_03ad4$Nh)
    
    # any position afterwards
    , c (m02gov_05ad4$coef[1], m02gov_05ad4$ci[3,], m02gov_05ad4$pv[3], m02gov_05ad4$bws[1,1], m02gov_05ad4$Nh)
    , c (m02pj_05ad4$coef[1], m02pj_05ad4$ci[3,], m02pj_05ad4$pv[3], m02pj_05ad4$bws[1,1], m02pj_05ad4$Nh)
    , c (m02ucr_05ad4$coef[1], m02ucr_05ad4$ci[3,], m02ucr_05ad4$pv[3], m02ucr_05ad4$bws[1,1], m02ucr_05ad4$Nh)
    
    # terms served afterwards
    , c (m02gov_06ad4$coef[1], m02gov_06ad4$ci[3,], m02gov_06ad4$pv[3], m02gov_06ad4$bws[1,1], m02gov_06ad4$Nh)
    , c (m02pj_06ad4$coef[1], m02pj_06ad4$ci[3,], m02pj_06ad4$pv[3], m02pj_06ad4$bws[1,1], m02pj_06ad4$Nh)
    , c (m02ucr_06ad4$coef[1], m02ucr_06ad4$ci[3,], m02ucr_06ad4$pv[3], m02ucr_06ad4$bws[1,1], m02ucr_06ad4$Nh))))
(tabRob08b <- cbind (
  sprintf ("%.2f", tabRob08a[,1])
  , paste ("[", sprintf ("%.2f", tabRob08a[,2]), ":", sprintf ("%.2f", tabRob08a[,3]), "]", sep="")
  , sprintf ("%.2f", tabRob08a[,4])
  , sprintf ("%.2f", tabRob08a[,5])
  , paste (sprintf ("%.0f", tabRob08a[,6]), "$|$", sprintf ("%.0f", tabRob08a[,7]), sep="")
  , rep ("", nrow (tabRob08a))
  , sprintf ("%.2f", tabRob08a[,8])
  , paste ("[", sprintf ("%.2f", tabRob08a[,9]), ":", sprintf ("%.2f", tabRob08a[,10]), "]", sep="")
  , sprintf ("%.2f", tabRob08a[,11])
  , sprintf ("%.2f", tabRob08a[,12])
  , paste (sprintf ("%.0f", tabRob08a[,13]), "$|$", sprintf ("%.0f", tabRob08a[,14]), sep="")
))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 5)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{renomination} (0/1)} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header4 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$pos[[4]] <- 6
addtorow$pos[[5]] <- 9
addtorow$pos[[6]] <- 12
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6)
print (xtable (  cbind (rows, tabRob08b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="Additional results (3): Candidates running for the first time"
                 , label="T:Rob08firsttimers")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="small"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA09.tex")



### Table A10

# getting the sample sizes
nrow (base.g); nrow (base.g[base.g$largeMag2==0,]); nrow (base.g[base.g$largeMag2==1,])
nrow (base.p); nrow (base.p[base.p$largeMag2==0,]); nrow (base.p[base.p$largeMag2==1,])
nrow (base.r); nrow (base.r[base.r$largeMag2==0,]); nrow (base.r[base.r$largeMag2==1,])

nrow (base.g[base.g$largeMag2==0 & base.g$running<0,]); nrow (base.g[base.g$largeMag2==0 & base.g$running>0,]); nrow (base.g[base.g$largeMag2==0,])
nrow (base.p[base.p$largeMag2==0 & base.p$running<0,]); nrow (base.p[base.p$largeMag2==0 & base.p$running>0,]); nrow (base.p[base.p$largeMag2==0,])
nrow (base.r[base.r$largeMag2==0 & base.r$running<0,]); nrow (base.r[base.r$largeMag2==0 & base.r$running>0,]); nrow (base.r[base.r$largeMag2==0,])
nrow (base.g[base.g$largeProv==0 & base.g$largeMag2==0 & base.g$running<0,]); nrow (base.g[base.g$largeProv==0 & base.g$largeMag2==0 & base.g$running>0,]); nrow (base.g[base.g$largeProv==0 & base.g$largeMag2==0,])
nrow (base.p[base.p$largeProv==0 & base.p$largeMag2==0 & base.p$running<0,]); nrow (base.p[base.p$largeProv==0 & base.p$largeMag2==0 & base.p$running>0,]); nrow (base.p[base.p$largeProv==0 & base.p$largeMag2==0,])
nrow (base.r[base.r$largeProv==0 & base.r$largeMag2==0 & base.r$running<0,]); nrow (base.r[base.r$largeProv==0 & base.r$largeMag2==0 & base.r$running>0,]); nrow (base.r[base.r$largeProv==0 & base.r$largeMag2==0,])

# building the table
(tabRob09a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01s4$coef[1], m02gov_01s4$ci[3,], m02gov_01s4$pv[3], m02gov_01s4$bws[1,1], m02gov_01s4$Nh)
    , c (m02pj_01s4$coef[1], m02pj_01s4$ci[3,], m02pj_01s4$pv[3], m02pj_01s4$bws[1,1], m02pj_01s4$Nh)
    , c (m02ucr_01s4$coef[1], m02ucr_01s4$ci[3,], m02ucr_01s4$pv[3], m02ucr_01s4$bws[1,1], m02ucr_01s4$Nh)
    
    # legislator afterwards
    , c (m02gov_02s4$coef[1], m02gov_02s4$ci[3,], m02gov_02s4$pv[3], m02gov_02s4$bws[1,1], m02gov_02s4$Nh)
    , c (m02pj_02s4$coef[1], m02pj_02s4$ci[3,], m02pj_02s4$pv[3], m02pj_02s4$bws[1,1], m02pj_02s4$Nh)
    , c (m02ucr_02s4$coef[1], m02ucr_02s4$ci[3,], m02ucr_02s4$pv[3], m02ucr_02s4$bws[1,1], m02ucr_02s4$Nh)
    
    # executive afterwards
    , c (m02gov_03s4$coef[1], m02gov_03s4$ci[3,], m02gov_03s4$pv[3], m02gov_03s4$bws[1,1], m02gov_03s4$Nh)
    , c (m02pj_03s4$coef[1], m02pj_03s4$ci[3,], m02pj_03s4$pv[3], m02pj_03s4$bws[1,1], m02pj_03s4$Nh)
    , c (m02ucr_03s4$coef[1], m02ucr_03s4$ci[3,], m02ucr_03s4$pv[3], m02ucr_03s4$bws[1,1], m02ucr_03s4$Nh)
    
    # any position afterwards
    , c (m02gov_05s4$coef[1], m02gov_05s4$ci[3,], m02gov_05s4$pv[3], m02gov_05s4$bws[1,1], m02gov_05s4$Nh)
    , c (m02pj_05s4$coef[1], m02pj_05s4$ci[3,], m02pj_05s4$pv[3], m02pj_05s4$bws[1,1], m02pj_05s4$Nh)
    , c (m02ucr_05s4$coef[1], m02ucr_05s4$ci[3,], m02ucr_05s4$pv[3], m02ucr_05s4$bws[1,1], m02ucr_05s4$Nh)
    
    # terms served afterwards
    , c (m02gov_06s4$coef[1], m02gov_06s4$ci[3,], m02gov_06s4$pv[3], m02gov_06s4$bws[1,1], m02gov_06s4$Nh)
    , c (m02pj_06s4$coef[1], m02pj_06s4$ci[3,], m02pj_06s4$pv[3], m02pj_06s4$bws[1,1], m02pj_06s4$Nh)
    , c (m02ucr_06s4$coef[1], m02ucr_06s4$ci[3,], m02ucr_06s4$pv[3], m02ucr_06s4$bws[1,1], m02ucr_06s4$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01v4$coef[1], m02gov_01v4$ci[3,], m02gov_01v4$pv[3], m02gov_01v4$bws[1,1], m02gov_01v4$Nh)
    , c (m02pj_01v4$coef[1], m02pj_01v4$ci[3,], m02pj_01v4$pv[3], m02pj_01v4$bws[1,1], m02pj_01v4$Nh)
    , c (m02ucr_01v4$coef[1], m02ucr_01v4$ci[3,], m02ucr_01v4$pv[3], m02ucr_01v4$bws[1,1], m02ucr_01v4$Nh)
    
    # legislator afterwards
    , c (m02gov_02v4$coef[1], m02gov_02v4$ci[3,], m02gov_02v4$pv[3], m02gov_02v4$bws[1,1], m02gov_02v4$Nh)
    , c (m02pj_02v4$coef[1], m02pj_02v4$ci[3,], m02pj_02v4$pv[3], m02pj_02v4$bws[1,1], m02pj_02v4$Nh)
    , c (m02ucr_02v4$coef[1], m02ucr_02v4$ci[3,], m02ucr_02v4$pv[3], m02ucr_02v4$bws[1,1], m02ucr_02v4$Nh)
    
    # executive afterwards
    , c (m02gov_03v4$coef[1], m02gov_03v4$ci[3,], m02gov_03v4$pv[3], m02gov_03v4$bws[1,1], m02gov_03v4$Nh)
    , c (m02pj_03v4$coef[1], m02pj_03v4$ci[3,], m02pj_03v4$pv[3], m02pj_03v4$bws[1,1], m02pj_03v4$Nh)
    , c (m02ucr_03v4$coef[1], m02ucr_03v4$ci[3,], m02ucr_03v4$pv[3], m02ucr_03v4$bws[1,1], m02ucr_03v4$Nh)
    
    # any position afterwards
    , c (m02gov_05v4$coef[1], m02gov_05v4$ci[3,], m02gov_05v4$pv[3], m02gov_05v4$bws[1,1], m02gov_05v4$Nh)
    , c (m02pj_05v4$coef[1], m02pj_05v4$ci[3,], m02pj_05v4$pv[3], m02pj_05v4$bws[1,1], m02pj_05v4$Nh)
    , c (m02ucr_05v4$coef[1], m02ucr_05v4$ci[3,], m02ucr_05v4$pv[3], m02ucr_05v4$bws[1,1], m02ucr_05v4$Nh)
    
    # terms served afterwards
    , c (m02gov_06v4$coef[1], m02gov_06v4$ci[3,], m02gov_06v4$pv[3], m02gov_06v4$bws[1,1], m02gov_06v4$Nh)
    , c (m02pj_06v4$coef[1], m02pj_06v4$ci[3,], m02pj_06v4$pv[3], m02pj_06v4$bws[1,1], m02pj_06v4$Nh)
    , c (m02ucr_06v4$coef[1], m02ucr_06v4$ci[3,], m02ucr_06v4$pv[3], m02ucr_06v4$bws[1,1], m02ucr_06v4$Nh))))
(tabRob09b <- cbind (
  sprintf ("%.2f", tabRob09a[,1])
  , paste ("[", sprintf ("%.2f", tabRob09a[,2]), ":", sprintf ("%.2f", tabRob09a[,3]), "]", sep="")
  , sprintf ("%.2f", tabRob09a[,4])
  , sprintf ("%.2f", tabRob09a[,5])
  , paste (sprintf ("%.0f", tabRob09a[,6]), "$|$", sprintf ("%.0f", tabRob09a[,7]), sep="")
  , rep ("", nrow (tabRob09a))
  , sprintf ("%.2f", tabRob09a[,8])
  , paste ("[", sprintf ("%.2f", tabRob09a[,9]), ":", sprintf ("%.2f", tabRob09a[,10]), "]", sep="")
  , sprintf ("%.2f", tabRob09a[,11])
  , sprintf ("%.2f", tabRob09a[,12])
  , paste (sprintf ("%.0f", tabRob09a[,13]), "$|$", sprintf ("%.0f", tabRob09a[,14]), sep="")))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 5)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{renomination} (0/1)} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header4 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$pos[[4]] <- 6
addtorow$pos[[5]] <- 9
addtorow$pos[[6]] <- 12
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6)
print (xtable (  cbind (rows, tabRob09b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="Additional results (4): Small-magnitude elections"
                 , label="T:Rob09smMag")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="small"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA10.tex")



### Table A11

# getting the sample sizes
nrow (base.g[base.g$largeMag2==1 & base.g$running<0,]); nrow (base.g[base.g$largeMag2==1 & base.g$running>0,]); nrow (base.g[base.g$largeMag2==1,])
nrow (base.p[base.p$largeMag2==1 & base.p$running<0,]); nrow (base.p[base.p$largeMag2==1 & base.p$running>0,]); nrow (base.p[base.p$largeMag2==1,])
nrow (base.r[base.r$largeMag2==1 & base.r$running<0,]); nrow (base.r[base.r$largeMag2==1 & base.r$running>0,]); nrow (base.r[base.r$largeMag2==1,])
nrow (base.g[base.g$largeProv==0 & base.g$largeMag2==1 & base.g$running<0,]); nrow (base.g[base.g$largeProv==0 & base.g$largeMag2==1 & base.g$running>0,]); nrow (base.g[base.g$largeProv==0 & base.g$largeMag2==1,])
nrow (base.p[base.p$largeProv==0 & base.p$largeMag2==1 & base.p$running<0,]); nrow (base.p[base.p$largeProv==0 & base.p$largeMag2==1 & base.p$running>0,]); nrow (base.p[base.p$largeProv==0 & base.p$largeMag2==1,])
nrow (base.r[base.r$largeProv==0 & base.r$largeMag2==1 & base.r$running<0,]); nrow (base.r[base.r$largeProv==0 & base.r$largeMag2==1 & base.r$running>0,]); nrow (base.r[base.r$largeProv==0 & base.r$largeMag2==1,])

# building the table
(tabRob10a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01m4$coef[1], m02gov_01m4$ci[3,], m02gov_01m4$pv[3], m02gov_01m4$bws[1,1], m02gov_01m4$Nh)
    , c (m02pj_01m4$coef[1], m02pj_01m4$ci[3,], m02pj_01m4$pv[3], m02pj_01m4$bws[1,1], m02pj_01m4$Nh)
    , c (m02ucr_01m4$coef[1], m02ucr_01m4$ci[3,], m02ucr_01m4$pv[3], m02ucr_01m4$bws[1,1], m02ucr_01m4$Nh)
    
    # legislator afterwards
    , c (m02gov_02m4$coef[1], m02gov_02m4$ci[3,], m02gov_02m4$pv[3], m02gov_02m4$bws[1,1], m02gov_02m4$Nh)
    , c (m02pj_02m4$coef[1], m02pj_02m4$ci[3,], m02pj_02m4$pv[3], m02pj_02m4$bws[1,1], m02pj_02m4$Nh)
    , c (m02ucr_02m4$coef[1], m02ucr_02m4$ci[3,], m02ucr_02m4$pv[3], m02ucr_02m4$bws[1,1], m02ucr_02m4$Nh)
    
    # executive afterwards
    , c (m02gov_03m4$coef[1], m02gov_03m4$ci[3,], m02gov_03m4$pv[3], m02gov_03m4$bws[1,1], m02gov_03m4$Nh)
    , c (m02pj_03m4$coef[1], m02pj_03m4$ci[3,], m02pj_03m4$pv[3], m02pj_03m4$bws[1,1], m02pj_03m4$Nh)
    , c (m02ucr_03m4$coef[1], m02ucr_03m4$ci[3,], m02ucr_03m4$pv[3], m02ucr_03m4$bws[1,1], m02ucr_03m4$Nh)
    
    # any position afterwards
    , c (m02gov_05m4$coef[1], m02gov_05m4$ci[3,], m02gov_05m4$pv[3], m02gov_05m4$bws[1,1], m02gov_05m4$Nh)
    , c (m02pj_05m4$coef[1], m02pj_05m4$ci[3,], m02pj_05m4$pv[3], m02pj_05m4$bws[1,1], m02pj_05m4$Nh)
    , c (m02ucr_05m4$coef[1], m02ucr_05m4$ci[3,], m02ucr_05m4$pv[3], m02ucr_05m4$bws[1,1], m02ucr_05m4$Nh)
    
    # terms served afterwards
    , c (m02gov_06m4$coef[1], m02gov_06m4$ci[3,], m02gov_06m4$pv[3], m02gov_06m4$bws[1,1], m02gov_06m4$Nh)
    , c (m02pj_06m4$coef[1], m02pj_06m4$ci[3,], m02pj_06m4$pv[3], m02pj_06m4$bws[1,1], m02pj_06m4$Nh)
    , c (m02ucr_06m4$coef[1], m02ucr_06m4$ci[3,], m02ucr_06m4$pv[3], m02ucr_06m4$bws[1,1], m02ucr_06m4$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01p4$coef[1], m02gov_01p4$ci[3,], m02gov_01p4$pv[3], m02gov_01p4$bws[1,1], m02gov_01p4$Nh)
    , c (m02pj_01p4$coef[1], m02pj_01p4$ci[3,], m02pj_01p4$pv[3], m02pj_01p4$bws[1,1], m02pj_01p4$Nh)
    , c (m02ucr_01p4$coef[1], m02ucr_01p4$ci[3,], m02ucr_01p4$pv[3], m02ucr_01p4$bws[1,1], m02ucr_01p4$Nh)
    
    # legislator afterwards
    , c (m02gov_02p4$coef[1], m02gov_02p4$ci[3,], m02gov_02p4$pv[3], m02gov_02p4$bws[1,1], m02gov_02p4$Nh)
    , c (m02pj_02p4$coef[1], m02pj_02p4$ci[3,], m02pj_02p4$pv[3], m02pj_02p4$bws[1,1], m02pj_02p4$Nh)
    , c (m02ucr_02p4$coef[1], m02ucr_02p4$ci[3,], m02ucr_02p4$pv[3], m02ucr_02p4$bws[1,1], m02ucr_02p4$Nh)
    
    # executive afterwards
    , c (m02gov_03p4$coef[1], m02gov_03p4$ci[3,], m02gov_03p4$pv[3], m02gov_03p4$bws[1,1], m02gov_03p4$Nh)
    , c (m02pj_03p4$coef[1], m02pj_03p4$ci[3,], m02pj_03p4$pv[3], m02pj_03p4$bws[1,1], m02pj_03p4$Nh)
    , c (m02ucr_03p4$coef[1], m02ucr_03p4$ci[3,], m02ucr_03p4$pv[3], m02ucr_03p4$bws[1,1], m02ucr_03p4$Nh)
    
    # any position afterwards
    , c (m02gov_05p4$coef[1], m02gov_05p4$ci[3,], m02gov_05p4$pv[3], m02gov_05p4$bws[1,1], m02gov_05p4$Nh)
    , c (m02pj_05p4$coef[1], m02pj_05p4$ci[3,], m02pj_05p4$pv[3], m02pj_05p4$bws[1,1], m02pj_05p4$Nh)
    , c (m02ucr_05p4$coef[1], m02ucr_05p4$ci[3,], m02ucr_05p4$pv[3], m02ucr_05p4$bws[1,1], m02ucr_05p4$Nh)
    
    # terms served afterwards
    , c (m02gov_06p4$coef[1], m02gov_06p4$ci[3,], m02gov_06p4$pv[3], m02gov_06p4$bws[1,1], m02gov_06p4$Nh)
    , c (m02pj_06p4$coef[1], m02pj_06p4$ci[3,], m02pj_06p4$pv[3], m02pj_06p4$bws[1,1], m02pj_06p4$Nh)
    , c (m02ucr_06p4$coef[1], m02ucr_06p4$ci[3,], m02ucr_06p4$pv[3], m02ucr_06p4$bws[1,1], m02ucr_06p4$Nh))))
(tabRob10b <- cbind (
  sprintf ("%.2f", tabRob10a[,1])
  , paste ("[", sprintf ("%.2f", tabRob10a[,2]), ":", sprintf ("%.2f", tabRob10a[,3]), "]", sep="")
  , sprintf ("%.2f", tabRob10a[,4])
  , sprintf ("%.2f", tabRob10a[,5])
  , paste (sprintf ("%.0f", tabRob10a[,6]), "$|$", sprintf ("%.0f", tabRob10a[,7]), sep="")
  , rep ("", nrow (tabRob10a))
  , sprintf ("%.2f", tabRob10a[,8])
  , paste ("[", sprintf ("%.2f", tabRob10a[,9]), ":", sprintf ("%.2f", tabRob10a[,10]), "]", sep="")
  , sprintf ("%.2f", tabRob10a[,11])
  , sprintf ("%.2f", tabRob10a[,12])
  , paste (sprintf ("%.0f", tabRob10a[,13]), "$|$", sprintf ("%.0f", tabRob10a[,14]), sep="")))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 5)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{renomination} (0/1)} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header4 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$pos[[4]] <- 6
addtorow$pos[[5]] <- 9
addtorow$pos[[6]] <- 12
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6)
print (xtable (  cbind (rows, tabRob10b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="Additional results (5): Large-magnitude elections"
                 , label="T:Rob10lgMag")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="small"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA11.tex")



### Table A12

# getting the sample sizes
nrow (base.g); nrow (base.g[base.g$female==0,]); nrow (base.g[base.g$female==1,])
nrow (base.p); nrow (base.p[base.p$female==0,]); nrow (base.p[base.p$female==1,])
nrow (base.r); nrow (base.r[base.r$female==0,]); nrow (base.r[base.r$female==1,])

nrow (base.g[base.g$female==1 & base.g$running<0,]); nrow (base.g[base.g$female==1 & base.g$running>0,]); nrow (base.g[base.g$female==1,])
nrow (base.p[base.p$female==1 & base.p$running<0,]); nrow (base.p[base.p$female==1 & base.p$running>0,]); nrow (base.p[base.p$female==1,])
nrow (base.r[base.r$female==1 & base.r$running<0,]); nrow (base.r[base.r$female==1 & base.r$running>0,]); nrow (base.r[base.r$female==1,])
nrow (base.g[base.g$largeProv==0 & base.g$female==1 & base.g$running<0,]); nrow (base.g[base.g$largeProv==0 & base.g$female==1 & base.g$running>0,]); nrow (base.g[base.g$largeProv==0 & base.g$female==1,])
nrow (base.p[base.p$largeProv==0 & base.p$female==1 & base.p$running<0,]); nrow (base.p[base.p$largeProv==0 & base.p$female==1 & base.p$running>0,]); nrow (base.p[base.p$largeProv==0 & base.p$female==1,])
nrow (base.r[base.r$largeProv==0 & base.r$female==1 & base.r$running<0,]); nrow (base.r[base.r$largeProv==0 & base.r$female==1 & base.r$running>0,]); nrow (base.r[base.r$largeProv==0 & base.r$female==1,])

# building the table
(tabRob11a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01ag4$coef[1], m02gov_01ag4$ci[3,], m02gov_01ag4$pv[3], m02gov_01ag4$bws[1,1], m02gov_01ag4$Nh)
    , c (m02pj_01ag4$coef[1], m02pj_01ag4$ci[3,], m02pj_01ag4$pv[3], m02pj_01ag4$bws[1,1], m02pj_01ag4$Nh)
    , c (m02ucr_01ag4$coef[1], m02ucr_01ag4$ci[3,], m02ucr_01ag4$pv[3], m02ucr_01ag4$bws[1,1], m02ucr_01ag4$Nh)
    
    # legislator afterwards
    , c (m02gov_02ag4$coef[1], m02gov_02ag4$ci[3,], m02gov_02ag4$pv[3], m02gov_02ag4$bws[1,1], m02gov_02ag4$Nh)
    , c (m02pj_02ag4$coef[1], m02pj_02ag4$ci[3,], m02pj_02ag4$pv[3], m02pj_02ag4$bws[1,1], m02pj_02ag4$Nh)
    , c (m02ucr_02ag4$coef[1], m02ucr_02ag4$ci[3,], m02ucr_02ag4$pv[3], m02ucr_02ag4$bws[1,1], m02ucr_02ag4$Nh)
    
    # executive afterwards
    , c (m02gov_03ag4$coef[1], m02gov_03ag4$ci[3,], m02gov_03ag4$pv[3], m02gov_03ag4$bws[1,1], m02gov_03ag4$Nh)
    , c (m02pj_03ag4$coef[1], m02pj_03ag4$ci[3,], m02pj_03ag4$pv[3], m02pj_03ag4$bws[1,1], m02pj_03ag4$Nh)
    , c (m02ucr_03ag4$coef[1], m02ucr_03ag4$ci[3,], m02ucr_03ag4$pv[3], m02ucr_03ag4$bws[1,1], m02ucr_03ag4$Nh)
    
    # any position afterwards
    , c (m02gov_05ag4$coef[1], m02gov_05ag4$ci[3,], m02gov_05ag4$pv[3], m02gov_05ag4$bws[1,1], m02gov_05ag4$Nh)
    , c (m02pj_05ag4$coef[1], m02pj_05ag4$ci[3,], m02pj_05ag4$pv[3], m02pj_05ag4$bws[1,1], m02pj_05ag4$Nh)
    , c (m02ucr_05ag4$coef[1], m02ucr_05ag4$ci[3,], m02ucr_05ag4$pv[3], m02ucr_05ag4$bws[1,1], m02ucr_05ag4$Nh)
    
    # terms served afterwards
    , c (m02gov_06ag4$coef[1], m02gov_06ag4$ci[3,], m02gov_06ag4$pv[3], m02gov_06ag4$bws[1,1], m02gov_06ag4$Nh)
    , c (m02pj_06ag4$coef[1], m02pj_06ag4$ci[3,], m02pj_06ag4$pv[3], m02pj_06ag4$bws[1,1], m02pj_06ag4$Nh)
    , c (m02ucr_06ag4$coef[1], m02ucr_06ag4$ci[3,], m02ucr_06ag4$pv[3], m02ucr_06ag4$bws[1,1], m02ucr_06ag4$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01aj4$coef[1], m02gov_01aj4$ci[3,], m02gov_01aj4$pv[3], m02gov_01aj4$bws[1,1], m02gov_01aj4$Nh)
    , c (m02pj_01aj4$coef[1], m02pj_01aj4$ci[3,], m02pj_01aj4$pv[3], m02pj_01aj4$bws[1,1], m02pj_01aj4$Nh)
    , c (m02ucr_01aj4$coef[1], m02ucr_01aj4$ci[3,], m02ucr_01aj4$pv[3], m02ucr_01aj4$bws[1,1], m02ucr_01aj4$Nh)
    
    # legislator afterwards
    , c (m02gov_02aj4$coef[1], m02gov_02aj4$ci[3,], m02gov_02aj4$pv[3], m02gov_02aj4$bws[1,1], m02gov_02aj4$Nh)
    , c (m02pj_02aj4$coef[1], m02pj_02aj4$ci[3,], m02pj_02aj4$pv[3], m02pj_02aj4$bws[1,1], m02pj_02aj4$Nh)
    , c (m02ucr_02aj4$coef[1], m02ucr_02aj4$ci[3,], m02ucr_02aj4$pv[3], m02ucr_02aj4$bws[1,1], m02ucr_02aj4$Nh)
    
    # executive afterwards
    , c (m02gov_03aj4$coef[1], m02gov_03aj4$ci[3,], m02gov_03aj4$pv[3], m02gov_03aj4$bws[1,1], m02gov_03aj4$Nh)
    , c (m02pj_03aj4$coef[1], m02pj_03aj4$ci[3,], m02pj_03aj4$pv[3], m02pj_03aj4$bws[1,1], m02pj_03aj4$Nh)
    , c (m02ucr_03aj4$coef[1], m02ucr_03aj4$ci[3,], m02ucr_03aj4$pv[3], m02ucr_03aj4$bws[1,1], m02ucr_03aj4$Nh)
    
    # any position afterwards
    , c (m02gov_05aj4$coef[1], m02gov_05aj4$ci[3,], m02gov_05aj4$pv[3], m02gov_05aj4$bws[1,1], m02gov_05aj4$Nh)
    , c (m02pj_05aj4$coef[1], m02pj_05aj4$ci[3,], m02pj_05aj4$pv[3], m02pj_05aj4$bws[1,1], m02pj_05aj4$Nh)
    , c (m02ucr_05aj4$coef[1], m02ucr_05aj4$ci[3,], m02ucr_05aj4$pv[3], m02ucr_05aj4$bws[1,1], m02ucr_05aj4$Nh)
    
    # terms served afterwards
    , c (m02gov_06aj4$coef[1], m02gov_06aj4$ci[3,], m02gov_06aj4$pv[3], m02gov_06aj4$bws[1,1], m02gov_06aj4$Nh)
    , c (m02pj_06aj4$coef[1], m02pj_06aj4$ci[3,], m02pj_06aj4$pv[3], m02pj_06aj4$bws[1,1], m02pj_06aj4$Nh)
    , c (m02ucr_06aj4$coef[1], m02ucr_06aj4$ci[3,], m02ucr_06aj4$pv[3], m02ucr_06aj4$bws[1,1], m02ucr_06aj4$Nh))))
(tabRob11b <- cbind (
  sprintf ("%.2f", tabRob11a[,1])
  , paste ("[", sprintf ("%.2f", tabRob11a[,2]), ":", sprintf ("%.2f", tabRob11a[,3]), "]", sep="")
  , sprintf ("%.2f", tabRob11a[,4])
  , sprintf ("%.2f", tabRob11a[,5])
  , paste (sprintf ("%.0f", tabRob11a[,6]), "$|$", sprintf ("%.0f", tabRob11a[,7]), sep="")
  , rep ("", nrow (tabRob11a))
  , sprintf ("%.2f", tabRob11a[,8])
  , paste ("[", sprintf ("%.2f", tabRob11a[,9]), ":", sprintf ("%.2f", tabRob11a[,10]), "]", sep="")
  , sprintf ("%.2f", tabRob11a[,11])
  , sprintf ("%.2f", tabRob11a[,12])
  , paste (sprintf ("%.0f", tabRob11a[,13]), "$|$", sprintf ("%.0f", tabRob11a[,14]), sep="")))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 5)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{renomination} (0/1)} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header4 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$pos[[4]] <- 6
addtorow$pos[[5]] <- 9
addtorow$pos[[6]] <- 12
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6)
print (xtable (  cbind (rows, tabRob11b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="Additional results (6): Female candidates only"
                 , label="T:rob11women")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="small"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA12.tex")


### Table A13

# getting the sample sizes
nrow (base.g[base.g$female==0 & base.g$running<0,]); nrow (base.g[base.g$female==0 & base.g$running>0,]); nrow (base.g[base.g$female==0,])
nrow (base.p[base.p$female==0 & base.p$running<0,]); nrow (base.p[base.p$female==0 & base.p$running>0,]); nrow (base.p[base.p$female==0,])
nrow (base.r[base.r$female==0 & base.r$running<0,]); nrow (base.r[base.r$female==0 & base.r$running>0,]); nrow (base.r[base.r$female==0,])
nrow (base.g[base.g$largeProv==0 & base.g$female==0 & base.g$running<0,]); nrow (base.g[base.g$largeProv==0 & base.g$female==0 & base.g$running>0,]); nrow (base.g[base.g$largeProv==0 & base.g$female==0,])
nrow (base.p[base.p$largeProv==0 & base.p$female==0 & base.p$running<0,]); nrow (base.p[base.p$largeProv==0 & base.p$female==0 & base.p$running>0,]); nrow (base.p[base.p$largeProv==0 & base.p$female==0,])
nrow (base.r[base.r$largeProv==0 & base.r$female==0 & base.r$running<0,]); nrow (base.r[base.r$largeProv==0 & base.r$female==0 & base.r$running>0,]); nrow (base.r[base.r$largeProv==0 & base.r$female==0,])

# building the table
(tabRob12a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01am4$coef[1], m02gov_01am4$ci[3,], m02gov_01am4$pv[3], m02gov_01am4$bws[1,1], m02gov_01am4$Nh)
    , c (m02pj_01am4$coef[1], m02pj_01am4$ci[3,], m02pj_01am4$pv[3], m02pj_01am4$bws[1,1], m02pj_01am4$Nh)
    , c (m02ucr_01am4$coef[1], m02ucr_01am4$ci[3,], m02ucr_01am4$pv[3], m02ucr_01am4$bws[1,1], m02ucr_01am4$Nh)
    
    # legislator afterwards
    , c (m02gov_02am4$coef[1], m02gov_02am4$ci[3,], m02gov_02am4$pv[3], m02gov_02am4$bws[1,1], m02gov_02am4$Nh)
    , c (m02pj_02am4$coef[1], m02pj_02am4$ci[3,], m02pj_02am4$pv[3], m02pj_02am4$bws[1,1], m02pj_02am4$Nh)
    , c (m02ucr_02am4$coef[1], m02ucr_02am4$ci[3,], m02ucr_02am4$pv[3], m02ucr_02am4$bws[1,1], m02ucr_02am4$Nh)
    
    # executive afterwards
    , c (m02gov_03am4$coef[1], m02gov_03am4$ci[3,], m02gov_03am4$pv[3], m02gov_03am4$bws[1,1], m02gov_03am4$Nh)
    , c (m02pj_03am4$coef[1], m02pj_03am4$ci[3,], m02pj_03am4$pv[3], m02pj_03am4$bws[1,1], m02pj_03am4$Nh)
    , c (m02ucr_03am4$coef[1], m02ucr_03am4$ci[3,], m02ucr_03am4$pv[3], m02ucr_03am4$bws[1,1], m02ucr_03am4$Nh)
    
    # any position afterwards
    , c (m02gov_05am4$coef[1], m02gov_05am4$ci[3,], m02gov_05am4$pv[3], m02gov_05am4$bws[1,1], m02gov_05am4$Nh)
    , c (m02pj_05am4$coef[1], m02pj_05am4$ci[3,], m02pj_05am4$pv[3], m02pj_05am4$bws[1,1], m02pj_05am4$Nh)
    , c (m02ucr_05am4$coef[1], m02ucr_05am4$ci[3,], m02ucr_05am4$pv[3], m02ucr_05am4$bws[1,1], m02ucr_05am4$Nh)
    
    # terms served afterwards
    , c (m02gov_06am4$coef[1], m02gov_06am4$ci[3,], m02gov_06am4$pv[3], m02gov_06am4$bws[1,1], m02gov_06am4$Nh)
    , c (m02pj_06am4$coef[1], m02pj_06am4$ci[3,], m02pj_06am4$pv[3], m02pj_06am4$bws[1,1], m02pj_06am4$Nh)
    , c (m02ucr_06am4$coef[1], m02ucr_06am4$ci[3,], m02ucr_06am4$pv[3], m02ucr_06am4$bws[1,1], m02ucr_06am4$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01ap4$coef[1], m02gov_01ap4$ci[3,], m02gov_01ap4$pv[3], m02gov_01ap4$bws[1,1], m02gov_01ap4$Nh)
    , c (m02pj_01ap4$coef[1], m02pj_01ap4$ci[3,], m02pj_01ap4$pv[3], m02pj_01ap4$bws[1,1], m02pj_01ap4$Nh)
    , c (m02ucr_01ap4$coef[1], m02ucr_01ap4$ci[3,], m02ucr_01ap4$pv[3], m02ucr_01ap4$bws[1,1], m02ucr_01ap4$Nh)
    
    # legislator afterwards
    , c (m02gov_02ap4$coef[1], m02gov_02ap4$ci[3,], m02gov_02ap4$pv[3], m02gov_02ap4$bws[1,1], m02gov_02ap4$Nh)
    , c (m02pj_02ap4$coef[1], m02pj_02ap4$ci[3,], m02pj_02ap4$pv[3], m02pj_02ap4$bws[1,1], m02pj_02ap4$Nh)
    , c (m02ucr_02ap4$coef[1], m02ucr_02ap4$ci[3,], m02ucr_02ap4$pv[3], m02ucr_02ap4$bws[1,1], m02ucr_02ap4$Nh)
    
    # executive afterwards
    , c (m02gov_03ap4$coef[1], m02gov_03ap4$ci[3,], m02gov_03ap4$pv[3], m02gov_03ap4$bws[1,1], m02gov_03ap4$Nh)
    , c (m02pj_03ap4$coef[1], m02pj_03ap4$ci[3,], m02pj_03ap4$pv[3], m02pj_03ap4$bws[1,1], m02pj_03ap4$Nh)
    , c (m02ucr_03ap4$coef[1], m02ucr_03ap4$ci[3,], m02ucr_03ap4$pv[3], m02ucr_03ap4$bws[1,1], m02ucr_03ap4$Nh)
    
    # any position afterwards
    , c (m02gov_05ap4$coef[1], m02gov_05ap4$ci[3,], m02gov_05ap4$pv[3], m02gov_05ap4$bws[1,1], m02gov_05ap4$Nh)
    , c (m02pj_05ap4$coef[1], m02pj_05ap4$ci[3,], m02pj_05ap4$pv[3], m02pj_05ap4$bws[1,1], m02pj_05ap4$Nh)
    , c (m02ucr_05ap4$coef[1], m02ucr_05ap4$ci[3,], m02ucr_05ap4$pv[3], m02ucr_05ap4$bws[1,1], m02ucr_05ap4$Nh)
    
    # terms served afterwards
    , c (m02gov_06ap4$coef[1], m02gov_06ap4$ci[3,], m02gov_06ap4$pv[3], m02gov_06ap4$bws[1,1], m02gov_06ap4$Nh)
    , c (m02pj_06ap4$coef[1], m02pj_06ap4$ci[3,], m02pj_06ap4$pv[3], m02pj_06ap4$bws[1,1], m02pj_06ap4$Nh)
    , c (m02ucr_06ap4$coef[1], m02ucr_06ap4$ci[3,], m02ucr_06ap4$pv[3], m02ucr_06ap4$bws[1,1], m02ucr_06ap4$Nh))))
(tabRob12b <- cbind (
  sprintf ("%.2f", tabRob12a[,1])
  , paste ("[", sprintf ("%.2f", tabRob12a[,2]), ":", sprintf ("%.2f", tabRob12a[,3]), "]", sep="")
  , sprintf ("%.2f", tabRob12a[,4])
  , sprintf ("%.2f", tabRob12a[,5])
  , paste (sprintf ("%.0f", tabRob12a[,6]), "$|$", sprintf ("%.0f", tabRob12a[,7]), sep="")
  , rep ("", nrow (tabRob12a))
  , sprintf ("%.2f", tabRob12a[,8])
  , paste ("[", sprintf ("%.2f", tabRob12a[,9]), ":", sprintf ("%.2f", tabRob12a[,10]), "]", sep="")
  , sprintf ("%.2f", tabRob12a[,11])
  , sprintf ("%.2f", tabRob12a[,12])
  , paste (sprintf ("%.0f", tabRob12a[,13]), "$|$", sprintf ("%.0f", tabRob12a[,14]), sep="")))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 5)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{renomination} (0/1)} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header4 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$pos[[4]] <- 6
addtorow$pos[[5]] <- 9
addtorow$pos[[6]] <- 12
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6)
print (xtable (  cbind (rows, tabRob12b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="Additional results (7): Male candidates only"
                 , label="T:rob12men")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="small"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA13.tex")



### Table A14 (fuzzy, assumed office)
(tabRob01a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01b4$coef[1], m02gov_01b4$ci[3,], m02gov_01b4$pv[3], m02gov_01b4$bws[1,1], m02gov_01b4$Nh)
    , c (m02pj_01b4$coef[1], m02pj_01b4$ci[3,], m02pj_01b4$pv[3], m02pj_01b4$bws[1,1], m02pj_01b4$Nh)
    , c (m02ucr_01b4$coef[1], m02ucr_01b4$ci[3,], m02ucr_01b4$pv[3], m02ucr_01b4$bws[1,1], m02ucr_01b4$Nh)
    
    # legislator afterwards
    , c (m02gov_02b4$coef[1], m02gov_02b4$ci[3,], m02gov_02b4$pv[3], m02gov_02b4$bws[1,1], m02gov_02b4$Nh)
    , c (m02pj_02b4$coef[1], m02pj_02b4$ci[3,], m02pj_02b4$pv[3], m02pj_02b4$bws[1,1], m02pj_02b4$Nh)
    , c (m02ucr_02b4$coef[1], m02ucr_02b4$ci[3,], m02ucr_02b4$pv[3], m02ucr_02b4$bws[1,1], m02ucr_02b4$Nh)
    
    # executive afterwards
    , c (m02gov_03b4$coef[1], m02gov_03b4$ci[3,], m02gov_03b4$pv[3], m02gov_03b4$bws[1,1], m02gov_03b4$Nh)
    , c (m02pj_03b4$coef[1], m02pj_03b4$ci[3,], m02pj_03b4$pv[3], m02pj_03b4$bws[1,1], m02pj_03b4$Nh)
    , c (m02ucr_03b4$coef[1], m02ucr_03b4$ci[3,], m02ucr_03b4$pv[3], m02ucr_03b4$bws[1,1], m02ucr_03b4$Nh)
    
    # any position afterwards
    , c (m02gov_05b4$coef[1], m02gov_05b4$ci[3,], m02gov_05b4$pv[3], m02gov_05b4$bws[1,1], m02gov_05b4$Nh)
    , c (m02pj_05b4$coef[1], m02pj_05b4$ci[3,], m02pj_05b4$pv[3], m02pj_05b4$bws[1,1], m02pj_05b4$Nh)
    , c (m02ucr_05b4$coef[1], m02ucr_05b4$ci[3,], m02ucr_05b4$pv[3], m02ucr_05b4$bws[1,1], m02ucr_05b4$Nh)
    
    # terms served afterwards
    , c (m02gov_06b4$coef[1], m02gov_06b4$ci[3,], m02gov_06b4$pv[3], m02gov_06b4$bws[1,1], m02gov_06b4$Nh)
    , c (m02pj_06b4$coef[1], m02pj_06b4$ci[3,], m02pj_06b4$pv[3], m02pj_06b4$bws[1,1], m02pj_06b4$Nh)
    , c (m02ucr_06b4$coef[1], m02ucr_06b4$ci[3,], m02ucr_06b4$pv[3], m02ucr_06b4$bws[1,1], m02ucr_06b4$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01e4$coef[1], m02gov_01e4$ci[3,], m02gov_01e4$pv[3], m02gov_01e4$bws[1,1], m02gov_01e4$Nh)
    , c (m02pj_01e4$coef[1], m02pj_01e4$ci[3,], m02pj_01e4$pv[3], m02pj_01e4$bws[1,1], m02pj_01e4$Nh)
    , c (m02ucr_01e4$coef[1], m02ucr_01e4$ci[3,], m02ucr_01e4$pv[3], m02ucr_01e4$bws[1,1], m02ucr_01e4$Nh)
    
    # legislator afterwards
    , c (m02gov_02e4$coef[1], m02gov_02e4$ci[3,], m02gov_02e4$pv[3], m02gov_02e4$bws[1,1], m02gov_02e4$Nh)
    , c (m02pj_02e4$coef[1], m02pj_02e4$ci[3,], m02pj_02e4$pv[3], m02pj_02e4$bws[1,1], m02pj_02e4$Nh)
    , c (m02ucr_02e4$coef[1], m02ucr_02e4$ci[3,], m02ucr_02e4$pv[3], m02ucr_02e4$bws[1,1], m02ucr_02e4$Nh)
    
    # executive afterwards
    , c (m02gov_03e4$coef[1], m02gov_03e4$ci[3,], m02gov_03e4$pv[3], m02gov_03e4$bws[1,1], m02gov_03e4$Nh)
    , c (m02pj_03e4$coef[1], m02pj_03e4$ci[3,], m02pj_03e4$pv[3], m02pj_03e4$bws[1,1], m02pj_03e4$Nh)
    , c (m02ucr_03e4$coef[1], m02ucr_03e4$ci[3,], m02ucr_03e4$pv[3], m02ucr_03e4$bws[1,1], m02ucr_03e4$Nh)
    
    # any position afterwards
    , c (m02gov_05e4$coef[1], m02gov_05e4$ci[3,], m02gov_05e4$pv[3], m02gov_05e4$bws[1,1], m02gov_05e4$Nh)
    , c (m02pj_05e4$coef[1], m02pj_05e4$ci[3,], m02pj_05e4$pv[3], m02pj_05e4$bws[1,1], m02pj_05e4$Nh)
    , c (m02ucr_05e4$coef[1], m02ucr_05e4$ci[3,], m02ucr_05e4$pv[3], m02ucr_05e4$bws[1,1], m02ucr_05e4$Nh)
    
    # terms served afterwards
    , c (m02gov_06e4$coef[1], m02gov_06e4$ci[3,], m02gov_06e4$pv[3], m02gov_06e4$bws[1,1], m02gov_06e4$Nh)
    , c (m02pj_06e4$coef[1], m02pj_06e4$ci[3,], m02pj_06e4$pv[3], m02pj_06e4$bws[1,1], m02pj_06e4$Nh)
    , c (m02ucr_06e4$coef[1], m02ucr_06e4$ci[3,], m02ucr_06e4$pv[3], m02ucr_06e4$bws[1,1], m02ucr_06e4$Nh))))
(tabRob01b <- cbind (
  sprintf ("%.2f", tabRob01a[,1])
  , paste ("[", sprintf ("%.2f", tabRob01a[,2]), ":", sprintf ("%.2f", tabRob01a[,3]), "]", sep="")
  , sprintf ("%.2f", tabRob01a[,4])
  , sprintf ("%.2f", tabRob01a[,5])
  , paste (sprintf ("%.0f", tabRob01a[,6]), "$|$", sprintf ("%.0f", tabRob01a[,7]), sep="")
  , rep ("", nrow (tabRob01a))
  , sprintf ("%.2f", tabRob01a[,8])
  , paste ("[", sprintf ("%.2f", tabRob01a[,9]), ":", sprintf ("%.2f", tabRob01a[,10]), "]", sep="")
  , sprintf ("%.2f", tabRob01a[,11])
  , sprintf ("%.2f", tabRob01a[,12])
  , paste (sprintf ("%.0f", tabRob01a[,13]), "$|$", sprintf ("%.0f", tabRob01a[,14]), sep="")))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 5)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{renomination} (0/1)} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header4 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$pos[[4]] <- 6
addtorow$pos[[5]] <- 9
addtorow$pos[[6]] <- 12
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6)
print (xtable (  cbind (rows, tabRob01b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="Robustness (1): Fuzzy \\textsc{rd} with \\emph{assumed office} (0/1) as treatment"
                 , label="T:rob01assumed")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="small"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA14.tex")



### Table A15 (fuzzy, time served)
(tabRob02a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01c4$coef[1], m02gov_01c4$ci[3,], m02gov_01c4$pv[3], m02gov_01c4$bws[1,1], m02gov_01c4$Nh)
    , c (m02pj_01c4$coef[1], m02pj_01c4$ci[3,], m02pj_01c4$pv[3], m02pj_01c4$bws[1,1], m02pj_01c4$Nh)
    , c (m02ucr_01c4$coef[1], m02ucr_01c4$ci[3,], m02ucr_01c4$pv[3], m02ucr_01c4$bws[1,1], m02ucr_01c4$Nh)
    
    # legislator afterwards
    , c (m02gov_02c4$coef[1], m02gov_02c4$ci[3,], m02gov_02c4$pv[3], m02gov_02c4$bws[1,1], m02gov_02c4$Nh)
    , c (m02pj_02c4$coef[1], m02pj_02c4$ci[3,], m02pj_02c4$pv[3], m02pj_02c4$bws[1,1], m02pj_02c4$Nh)
    , c (m02ucr_02c4$coef[1], m02ucr_02c4$ci[3,], m02ucr_02c4$pv[3], m02ucr_02c4$bws[1,1], m02ucr_02c4$Nh)
    
    # executive afterwards
    , c (m02gov_03c4$coef[1], m02gov_03c4$ci[3,], m02gov_03c4$pv[3], m02gov_03c4$bws[1,1], m02gov_03c4$Nh)
    , c (m02pj_03c4$coef[1], m02pj_03c4$ci[3,], m02pj_03c4$pv[3], m02pj_03c4$bws[1,1], m02pj_03c4$Nh)
    , c (m02ucr_03c4$coef[1], m02ucr_03c4$ci[3,], m02ucr_03c4$pv[3], m02ucr_03c4$bws[1,1], m02ucr_03c4$Nh)
    
    # any position afterwards
    , c (m02gov_05c4$coef[1], m02gov_05c4$ci[3,], m02gov_05c4$pv[3], m02gov_05c4$bws[1,1], m02gov_05c4$Nh)
    , c (m02pj_05c4$coef[1], m02pj_05c4$ci[3,], m02pj_05c4$pv[3], m02pj_05c4$bws[1,1], m02pj_05c4$Nh)
    , c (m02ucr_05c4$coef[1], m02ucr_05c4$ci[3,], m02ucr_05c4$pv[3], m02ucr_05c4$bws[1,1], m02ucr_05c4$Nh)
    
    # terms served afterwards
    , c (m02gov_06c4$coef[1], m02gov_06c4$ci[3,], m02gov_06c4$pv[3], m02gov_06c4$bws[1,1], m02gov_06c4$Nh)
    , c (m02pj_06c4$coef[1], m02pj_06c4$ci[3,], m02pj_06c4$pv[3], m02pj_06c4$bws[1,1], m02pj_06c4$Nh)
    , c (m02ucr_06c4$coef[1], m02ucr_06c4$ci[3,], m02ucr_06c4$pv[3], m02ucr_06c4$bws[1,1], m02ucr_06c4$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01f4$coef[1], m02gov_01f4$ci[3,], m02gov_01f4$pv[3], m02gov_01f4$bws[1,1], m02gov_01f4$Nh)
    , c (m02pj_01f4$coef[1], m02pj_01f4$ci[3,], m02pj_01f4$pv[3], m02pj_01f4$bws[1,1], m02pj_01f4$Nh)
    , c (m02ucr_01f4$coef[1], m02ucr_01f4$ci[3,], m02ucr_01f4$pv[3], m02ucr_01f4$bws[1,1], m02ucr_01f4$Nh)
    
    # legislator afterwards
    , c (m02gov_02f4$coef[1], m02gov_02f4$ci[3,], m02gov_02f4$pv[3], m02gov_02f4$bws[1,1], m02gov_02f4$Nh)
    , c (m02pj_02f4$coef[1], m02pj_02f4$ci[3,], m02pj_02f4$pv[3], m02pj_02f4$bws[1,1], m02pj_02f4$Nh)
    , c (m02ucr_02f4$coef[1], m02ucr_02f4$ci[3,], m02ucr_02f4$pv[3], m02ucr_02f4$bws[1,1], m02ucr_02f4$Nh)
    
    # executive afterwards
    , c (m02gov_03f4$coef[1], m02gov_03f4$ci[3,], m02gov_03f4$pv[3], m02gov_03f4$bws[1,1], m02gov_03f4$Nh)
    , c (m02pj_03f4$coef[1], m02pj_03f4$ci[3,], m02pj_03f4$pv[3], m02pj_03f4$bws[1,1], m02pj_03f4$Nh)
    , c (m02ucr_03f4$coef[1], m02ucr_03f4$ci[3,], m02ucr_03f4$pv[3], m02ucr_03f4$bws[1,1], m02ucr_03f4$Nh)
    
    # any position afterwards
    , c (m02gov_05f4$coef[1], m02gov_05f4$ci[3,], m02gov_05f4$pv[3], m02gov_05f4$bws[1,1], m02gov_05f4$Nh)
    , c (m02pj_05f4$coef[1], m02pj_05f4$ci[3,], m02pj_05f4$pv[3], m02pj_05f4$bws[1,1], m02pj_05f4$Nh)
    , c (m02ucr_05f4$coef[1], m02ucr_05f4$ci[3,], m02ucr_05f4$pv[3], m02ucr_05f4$bws[1,1], m02ucr_05f4$Nh)
    
    # terms served afterwards
    , c (m02gov_06f4$coef[1], m02gov_06f4$ci[3,], m02gov_06f4$pv[3], m02gov_06f4$bws[1,1], m02gov_06f4$Nh)
    , c (m02pj_06f4$coef[1], m02pj_06f4$ci[3,], m02pj_06f4$pv[3], m02pj_06f4$bws[1,1], m02pj_06f4$Nh)
    , c (m02ucr_06f4$coef[1], m02ucr_06f4$ci[3,], m02ucr_06f4$pv[3], m02ucr_06f4$bws[1,1], m02ucr_06f4$Nh))))
(tabRob02b <- cbind (
  sprintf ("%.2f", tabRob02a[,1])
  , paste ("[", sprintf ("%.2f", tabRob02a[,2]), ":", sprintf ("%.2f", tabRob02a[,3]), "]", sep="")
  , sprintf ("%.2f", tabRob02a[,4])
  , sprintf ("%.2f", tabRob02a[,5])
  , paste (sprintf ("%.0f", tabRob02a[,6]), "$|$", sprintf ("%.0f", tabRob02a[,7]), sep="")
  , rep ("", nrow (tabRob02a))
  , sprintf ("%.2f", tabRob02a[,8])
  , paste ("[", sprintf ("%.2f", tabRob02a[,9]), ":", sprintf ("%.2f", tabRob02a[,10]), "]", sep="")
  , sprintf ("%.2f", tabRob02a[,11])
  , sprintf ("%.2f", tabRob02a[,12])
  , paste (sprintf ("%.0f", tabRob02a[,13]), "$|$", sprintf ("%.0f", tabRob02a[,14]), sep="")))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 5)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{renomination} (0/1)} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header4 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$pos[[4]] <- 6
addtorow$pos[[5]] <- 9
addtorow$pos[[6]] <- 12
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6)
print (xtable (  cbind (rows, tabRob02b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="Robustness (2): Fuzzy \\textsc{rd} with \\emph{time served} as treatment"
                 , label="T:rob02served")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="small"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA15.tex")



### Table A16 (adding controls)
(tabRob03a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01a6$coef[1], m02gov_01a6$ci[3,], m02gov_01a6$pv[3], m02gov_01a6$bws[1,1], m02gov_01a6$Nh)
    , c (m02pj_01a6$coef[1], m02pj_01a6$ci[3,], m02pj_01a6$pv[3], m02pj_01a6$bws[1,1], m02pj_01a6$Nh)
    , c (m02ucr_01a6$coef[1], m02ucr_01a6$ci[3,], m02ucr_01a6$pv[3], m02ucr_01a6$bws[1,1], m02ucr_01a6$Nh)
    
    # legislator afterwards
    , c (m02gov_02a6$coef[1], m02gov_02a6$ci[3,], m02gov_02a6$pv[3], m02gov_02a6$bws[1,1], m02gov_02a6$Nh)
    , c (m02pj_02a6$coef[1], m02pj_02a6$ci[3,], m02pj_02a6$pv[3], m02pj_02a6$bws[1,1], m02pj_02a6$Nh)
    , c (m02ucr_02a6$coef[1], m02ucr_02a6$ci[3,], m02ucr_02a6$pv[3], m02ucr_02a6$bws[1,1], m02ucr_02a6$Nh)
    
    # executive afterwards
    , c (m02gov_03a6$coef[1], m02gov_03a6$ci[3,], m02gov_03a6$pv[3], m02gov_03a6$bws[1,1], m02gov_03a6$Nh)
    , c (m02pj_03a6$coef[1], m02pj_03a6$ci[3,], m02pj_03a6$pv[3], m02pj_03a6$bws[1,1], m02pj_03a6$Nh)
    , c (m02ucr_03a6$coef[1], m02ucr_03a6$ci[3,], m02ucr_03a6$pv[3], m02ucr_03a6$bws[1,1], m02ucr_03a6$Nh)
    
    # any position afterwards
    , c (m02gov_05a6$coef[1], m02gov_05a6$ci[3,], m02gov_05a6$pv[3], m02gov_05a6$bws[1,1], m02gov_05a6$Nh)
    , c (m02pj_05a6$coef[1], m02pj_05a6$ci[3,], m02pj_05a6$pv[3], m02pj_05a6$bws[1,1], m02pj_05a6$Nh)
    , c (m02ucr_05a6$coef[1], m02ucr_05a6$ci[3,], m02ucr_05a6$pv[3], m02ucr_05a6$bws[1,1], m02ucr_05a6$Nh)
    
    # terms served afterwards
    , c (m02gov_06a6$coef[1], m02gov_06a6$ci[3,], m02gov_06a6$pv[3], m02gov_06a6$bws[1,1], m02gov_06a6$Nh)
    , c (m02pj_06a6$coef[1], m02pj_06a6$ci[3,], m02pj_06a6$pv[3], m02pj_06a6$bws[1,1], m02pj_06a6$Nh)
    , c (m02ucr_06a6$coef[1], m02ucr_06a6$ci[3,], m02ucr_06a6$pv[3], m02ucr_06a6$bws[1,1], m02ucr_06a6$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01d6$coef[1], m02gov_01d6$ci[3,], m02gov_01d6$pv[3], m02gov_01d6$bws[1,1], m02gov_01d6$Nh)
    , c (m02pj_01d6$coef[1], m02pj_01d6$ci[3,], m02pj_01d6$pv[3], m02pj_01d6$bws[1,1], m02pj_01d6$Nh)
    , c (m02ucr_01d6$coef[1], m02ucr_01d6$ci[3,], m02ucr_01d6$pv[3], m02ucr_01d6$bws[1,1], m02ucr_01d6$Nh)
    
    # legislator afterwards
    , c (m02gov_02d6$coef[1], m02gov_02d6$ci[3,], m02gov_02d6$pv[3], m02gov_02d6$bws[1,1], m02gov_02d6$Nh)
    , c (m02pj_02d6$coef[1], m02pj_02d6$ci[3,], m02pj_02d6$pv[3], m02pj_02d6$bws[1,1], m02pj_02d6$Nh)
    , c (m02ucr_02d6$coef[1], m02ucr_02d6$ci[3,], m02ucr_02d6$pv[3], m02ucr_02d6$bws[1,1], m02ucr_02d6$Nh)
    
    # executive afterwards
    , c (m02gov_03d6$coef[1], m02gov_03d6$ci[3,], m02gov_03d6$pv[3], m02gov_03d6$bws[1,1], m02gov_03d6$Nh)
    , c (m02pj_03d6$coef[1], m02pj_03d6$ci[3,], m02pj_03d6$pv[3], m02pj_03d6$bws[1,1], m02pj_03d6$Nh)
    , c (m02ucr_03d6$coef[1], m02ucr_03d6$ci[3,], m02ucr_03d6$pv[3], m02ucr_03d6$bws[1,1], m02ucr_03d6$Nh)
    
    # any position afterwards
    , c (m02gov_05d6$coef[1], m02gov_05d6$ci[3,], m02gov_05d6$pv[3], m02gov_05d6$bws[1,1], m02gov_05d6$Nh)
    , c (m02pj_05d6$coef[1], m02pj_05d6$ci[3,], m02pj_05d6$pv[3], m02pj_05d6$bws[1,1], m02pj_05d6$Nh)
    , c (m02ucr_05d6$coef[1], m02ucr_05d6$ci[3,], m02ucr_05d6$pv[3], m02ucr_05d6$bws[1,1], m02ucr_05d6$Nh)
    
    # terms served afterwards
    , c (m02gov_06d6$coef[1], m02gov_06d6$ci[3,], m02gov_06d6$pv[3], m02gov_06d6$bws[1,1], m02gov_06d6$Nh)
    , c (m02pj_06d6$coef[1], m02pj_06d6$ci[3,], m02pj_06d6$pv[3], m02pj_06d6$bws[1,1], m02pj_06d6$Nh)
    , c (m02ucr_06d6$coef[1], m02ucr_06d6$ci[3,], m02ucr_06d6$pv[3], m02ucr_06d6$bws[1,1], m02ucr_06d6$Nh))))
(tabRob03b <- cbind (
  sprintf ("%.2f", tabRob03a[,1])
  , paste ("[", sprintf ("%.2f", tabRob03a[,2]), ":", sprintf ("%.2f", tabRob03a[,3]), "]", sep="")
  , sprintf ("%.2f", tabRob03a[,4])
  , sprintf ("%.2f", tabRob03a[,5])
  , paste (sprintf ("%.0f", tabRob03a[,6]), "$|$", sprintf ("%.0f", tabRob03a[,7]), sep="")
  , rep ("", nrow (tabRob03a))
  , sprintf ("%.2f", tabRob03a[,8])
  , paste ("[", sprintf ("%.2f", tabRob03a[,9]), ":", sprintf ("%.2f", tabRob03a[,10]), "]", sep="")
  , sprintf ("%.2f", tabRob03a[,11])
  , sprintf ("%.2f", tabRob03a[,12])
  , paste (sprintf ("%.0f", tabRob03a[,13]), "$|$", sprintf ("%.0f", tabRob03a[,14]), sep="")))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 5)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{renomination} (0/1)} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header4 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$pos[[4]] <- 6
addtorow$pos[[5]] <- 9
addtorow$pos[[6]] <- 12
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6)
print (xtable (  cbind (rows, tabRob03b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="Robustness (3): Adding controls"
                 , label="T:Rob03controls")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="small"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA16.tex")



### Table A17 (second-order polynomial)
(tabRob04a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01a7$coef[1], m02gov_01a7$ci[3,], m02gov_01a7$pv[3], m02gov_01a7$bws[1,1], m02gov_01a7$Nh)
    , c (m02pj_01a7$coef[1], m02pj_01a7$ci[3,], m02pj_01a7$pv[3], m02pj_01a7$bws[1,1], m02pj_01a7$Nh)
    , c (m02ucr_01a7$coef[1], m02ucr_01a7$ci[3,], m02ucr_01a7$pv[3], m02ucr_01a7$bws[1,1], m02ucr_01a7$Nh)
    
    # legislator afterwards
    , c (m02gov_02a7$coef[1], m02gov_02a7$ci[3,], m02gov_02a7$pv[3], m02gov_02a7$bws[1,1], m02gov_02a7$Nh)
    , c (m02pj_02a7$coef[1], m02pj_02a7$ci[3,], m02pj_02a7$pv[3], m02pj_02a7$bws[1,1], m02pj_02a7$Nh)
    , c (m02ucr_02a7$coef[1], m02ucr_02a7$ci[3,], m02ucr_02a7$pv[3], m02ucr_02a7$bws[1,1], m02ucr_02a7$Nh)
    
    # executive afterwards
    , c (m02gov_03a7$coef[1], m02gov_03a7$ci[3,], m02gov_03a7$pv[3], m02gov_03a7$bws[1,1], m02gov_03a7$Nh)
    , c (m02pj_03a7$coef[1], m02pj_03a7$ci[3,], m02pj_03a7$pv[3], m02pj_03a7$bws[1,1], m02pj_03a7$Nh)
    , c (m02ucr_03a7$coef[1], m02ucr_03a7$ci[3,], m02ucr_03a7$pv[3], m02ucr_03a7$bws[1,1], m02ucr_03a7$Nh)
    
    # any position afterwards
    , c (m02gov_05a7$coef[1], m02gov_05a7$ci[3,], m02gov_05a7$pv[3], m02gov_05a7$bws[1,1], m02gov_05a7$Nh)
    , c (m02pj_05a7$coef[1], m02pj_05a7$ci[3,], m02pj_05a7$pv[3], m02pj_05a7$bws[1,1], m02pj_05a7$Nh)
    , c (m02ucr_05a7$coef[1], m02ucr_05a7$ci[3,], m02ucr_05a7$pv[3], m02ucr_05a7$bws[1,1], m02ucr_05a7$Nh)
    
    # terms served afterwards
    , c (m02gov_06a7$coef[1], m02gov_06a7$ci[3,], m02gov_06a7$pv[3], m02gov_06a7$bws[1,1], m02gov_06a7$Nh)
    , c (m02pj_06a7$coef[1], m02pj_06a7$ci[3,], m02pj_06a7$pv[3], m02pj_06a7$bws[1,1], m02pj_06a7$Nh)
    , c (m02ucr_06a7$coef[1], m02ucr_06a7$ci[3,], m02ucr_06a7$pv[3], m02ucr_06a7$bws[1,1], m02ucr_06a7$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (m02gov_01d7$coef[1], m02gov_01d7$ci[3,], m02gov_01d7$pv[3], m02gov_01d7$bws[1,1], m02gov_01d7$Nh)
    , c (m02pj_01d7$coef[1], m02pj_01d7$ci[3,], m02pj_01d7$pv[3], m02pj_01d7$bws[1,1], m02pj_01d7$Nh)
    , c (m02ucr_01d7$coef[1], m02ucr_01d7$ci[3,], m02ucr_01d7$pv[3], m02ucr_01d7$bws[1,1], m02ucr_01d7$Nh)
    
    # legislator afterwards
    , c (m02gov_02d7$coef[1], m02gov_02d7$ci[3,], m02gov_02d7$pv[3], m02gov_02d7$bws[1,1], m02gov_02d7$Nh)
    , c (m02pj_02d7$coef[1], m02pj_02d7$ci[3,], m02pj_02d7$pv[3], m02pj_02d7$bws[1,1], m02pj_02d7$Nh)
    , c (m02ucr_02d7$coef[1], m02ucr_02d7$ci[3,], m02ucr_02d7$pv[3], m02ucr_02d7$bws[1,1], m02ucr_02d7$Nh)
    
    # executive afterwards
    , c (m02gov_03d7$coef[1], m02gov_03d7$ci[3,], m02gov_03d7$pv[3], m02gov_03d7$bws[1,1], m02gov_03d7$Nh)
    , c (m02pj_03d7$coef[1], m02pj_03d7$ci[3,], m02pj_03d7$pv[3], m02pj_03d7$bws[1,1], m02pj_03d7$Nh)
    , c (m02ucr_03d7$coef[1], m02ucr_03d7$ci[3,], m02ucr_03d7$pv[3], m02ucr_03d7$bws[1,1], m02ucr_03d7$Nh)
    
    # any position afterwards
    , c (m02gov_05d7$coef[1], m02gov_05d7$ci[3,], m02gov_05d7$pv[3], m02gov_05d7$bws[1,1], m02gov_05d7$Nh)
    , c (m02pj_05d7$coef[1], m02pj_05d7$ci[3,], m02pj_05d7$pv[3], m02pj_05d7$bws[1,1], m02pj_05d7$Nh)
    , c (m02ucr_05d7$coef[1], m02ucr_05d7$ci[3,], m02ucr_05d7$pv[3], m02ucr_05d7$bws[1,1], m02ucr_05d7$Nh)
    
    # terms served afterwards
    , c (m02gov_06d7$coef[1], m02gov_06d7$ci[3,], m02gov_06d7$pv[3], m02gov_06d7$bws[1,1], m02gov_06d7$Nh)
    , c (m02pj_06d7$coef[1], m02pj_06d7$ci[3,], m02pj_06d7$pv[3], m02pj_06d7$bws[1,1], m02pj_06d7$Nh)
    , c (m02ucr_06d7$coef[1], m02ucr_06d7$ci[3,], m02ucr_06d7$pv[3], m02ucr_06d7$bws[1,1], m02ucr_06d7$Nh))))
(tabRob04b <- cbind (
  sprintf ("%.2f", tabRob04a[,1])
  , paste ("[", sprintf ("%.2f", tabRob04a[,2]), ":", sprintf ("%.2f", tabRob04a[,3]), "]", sep="")
  , sprintf ("%.2f", tabRob04a[,4])
  , sprintf ("%.2f", tabRob04a[,5])
  , paste (sprintf ("%.0f", tabRob04a[,6]), "$|$", sprintf ("%.0f", tabRob04a[,7]), sep="")
  , rep ("", nrow (tabRob04a))
  , sprintf ("%.2f", tabRob04a[,8])
  , paste ("[", sprintf ("%.2f", tabRob04a[,9]), ":", sprintf ("%.2f", tabRob04a[,10]), "]", sep="")
  , sprintf ("%.2f", tabRob04a[,11])
  , sprintf ("%.2f", tabRob04a[,12])
  , paste (sprintf ("%.0f", tabRob04a[,13]), "$|$", sprintf ("%.0f", tabRob04a[,14]), sep="")))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 5)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{renomination} (0/1)} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header4 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$pos[[4]] <- 6
addtorow$pos[[5]] <- 9
addtorow$pos[[6]] <- 12
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6)
print (xtable (  cbind (rows, tabRob04b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="Robustness (4): Second-order polynomial instead of linear regression"
                 , label="T:Rob04poly")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="small"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA17.tex")



### Table A18 (alternative RV)
(tabRob06a <- cbind (
  
  ## all provinces
  rbind (
    
    # renomination at t+2 or t+4
    c (m05gov_01a3$coef[1], m05gov_01a3$ci[3,], m05gov_01a3$pv[3], m05gov_01a3$bws[1,1], m05gov_01a3$Nh)
    , c (m05pj_01a3$coef[1], m05pj_01a3$ci[3,], m05pj_01a3$pv[3], m05pj_01a3$bws[1,1], m05pj_01a3$Nh)
    , c (m05ucr_01a3$coef[1], m05ucr_01a3$ci[3,], m05ucr_01a3$pv[3], m05ucr_01a3$bws[1,1], m05ucr_01a3$Nh)
    
    # legislator afterwards
    , c (m05gov_02a3$coef[1], m05gov_02a3$ci[3,], m05gov_02a3$pv[3], m05gov_02a3$bws[1,1], m05gov_02a3$Nh)
    , c (m05pj_02a3$coef[1], m05pj_02a3$ci[3,], m05pj_02a3$pv[3], m05pj_02a3$bws[1,1], m05pj_02a3$Nh)
    , c (m05ucr_02a3$coef[1], m05ucr_02a3$ci[3,], m05ucr_02a3$pv[3], m05ucr_02a3$bws[1,1], m05ucr_02a3$Nh)
    
    # executive afterwards
    , c (m05gov_03a3$coef[1], m05gov_03a3$ci[3,], m05gov_03a3$pv[3], m05gov_03a3$bws[1,1], m05gov_03a3$Nh)
    , c (m05pj_03a3$coef[1], m05pj_03a3$ci[3,], m05pj_03a3$pv[3], m05pj_03a3$bws[1,1], m05pj_03a3$Nh)
    , c (m05ucr_03a3$coef[1], m05ucr_03a3$ci[3,], m05ucr_03a3$pv[3], m05ucr_03a3$bws[1,1], m05ucr_03a3$Nh)
    
    # any position afterwards
    , c (m05gov_05a3$coef[1], m05gov_05a3$ci[3,], m05gov_05a3$pv[3], m05gov_05a3$bws[1,1], m05gov_05a3$Nh)
    , c (m05pj_05a3$coef[1], m05pj_05a3$ci[3,], m05pj_05a3$pv[3], m05pj_05a3$bws[1,1], m05pj_05a3$Nh)
    , c (m05ucr_05a3$coef[1], m05ucr_05a3$ci[3,], m05ucr_05a3$pv[3], m05ucr_05a3$bws[1,1], m05ucr_05a3$Nh)
    
    # terms served afterwards
    , c (m05gov_06a3$coef[1], m05gov_06a3$ci[3,], m05gov_06a3$pv[3], m05gov_06a3$bws[1,1], m05gov_06a3$Nh)
    , c (m05pj_06a3$coef[1], m05pj_06a3$ci[3,], m05pj_06a3$pv[3], m05pj_06a3$bws[1,1], m05pj_06a3$Nh)
    , c (m05ucr_06a3$coef[1], m05ucr_06a3$ci[3,], m05ucr_06a3$pv[3], m05ucr_06a3$bws[1,1], m05ucr_06a3$Nh)
  )
  
  ## small provinces
  , rbind (
    
    # renomination at t+2 or t+4
    c (m05gov_01d3$coef[1], m05gov_01d3$ci[3,], m05gov_01d3$pv[3], m05gov_01d3$bws[1,1], m05gov_01d3$Nh)
    , c (m05pj_01d3$coef[1], m05pj_01d3$ci[3,], m05pj_01d3$pv[3], m05pj_01d3$bws[1,1], m05pj_01d3$Nh)
    , c (m05ucr_01d3$coef[1], m05ucr_01d3$ci[3,], m05ucr_01d3$pv[3], m05ucr_01d3$bws[1,1], m05ucr_01d3$Nh)
    
    # legislator afterwards
    , c (m05gov_02d3$coef[1], m05gov_02d3$ci[3,], m05gov_02d3$pv[3], m05gov_02d3$bws[1,1], m05gov_02d3$Nh)
    , c (m05pj_02d3$coef[1], m05pj_02d3$ci[3,], m05pj_02d3$pv[3], m05pj_02d3$bws[1,1], m05pj_02d3$Nh)
    , c (m05ucr_02d3$coef[1], m05ucr_02d3$ci[3,], m05ucr_02d3$pv[3], m05ucr_02d3$bws[1,1], m05ucr_02d3$Nh)
    
    # executive afterwards
    , c (m05gov_03d3$coef[1], m05gov_03d3$ci[3,], m05gov_03d3$pv[3], m05gov_03d3$bws[1,1], m05gov_03d3$Nh)
    , c (m05pj_03d3$coef[1], m05pj_03d3$ci[3,], m05pj_03d3$pv[3], m05pj_03d3$bws[1,1], m05pj_03d3$Nh)
    , c (m05ucr_03d3$coef[1], m05ucr_03d3$ci[3,], m05ucr_03d3$pv[3], m05ucr_03d3$bws[1,1], m05ucr_03d3$Nh)
    
    # any position afterwards
    , c (m05gov_05d3$coef[1], m05gov_05d3$ci[3,], m05gov_05d3$pv[3], m05gov_05d3$bws[1,1], m05gov_05d3$Nh)
    , c (m05pj_05d3$coef[1], m05pj_05d3$ci[3,], m05pj_05d3$pv[3], m05pj_05d3$bws[1,1], m05pj_05d3$Nh)
    , c (m05ucr_05d3$coef[1], m05ucr_05d3$ci[3,], m05ucr_05d3$pv[3], m05ucr_05d3$bws[1,1], m05ucr_05d3$Nh)
    
    # terms served afterwards
    , c (m05gov_06d3$coef[1], m05gov_06d3$ci[3,], m05gov_06d3$pv[3], m05gov_06d3$bws[1,1], m05gov_06d3$Nh)
    , c (m05pj_06d3$coef[1], m05pj_06d3$ci[3,], m05pj_06d3$pv[3], m05pj_06d3$bws[1,1], m05pj_06d3$Nh)
    , c (m05ucr_06d3$coef[1], m05ucr_06d3$ci[3,], m05ucr_06d3$pv[3], m05ucr_06d3$bws[1,1], m05ucr_06d3$Nh))))
(tabRob06b <- cbind (
  sprintf ("%.2f", tabRob06a[,1])
  , paste ("[", sprintf ("%.2f", tabRob06a[,2]), ":", sprintf ("%.2f", tabRob06a[,3]), "]", sep="")
  , sprintf ("%.2f", tabRob06a[,4])
  , sprintf ("%.2f", tabRob06a[,5])
  , paste (sprintf ("%.0f", tabRob06a[,6]), "$|$", sprintf ("%.0f", tabRob06a[,7]), sep="")
  , rep ("", nrow (tabRob06a))
  , sprintf ("%.2f", tabRob06a[,8])
  , paste ("[", sprintf ("%.2f", tabRob06a[,9]), ":", sprintf ("%.2f", tabRob06a[,10]), "]", sep="")
  , sprintf ("%.2f", tabRob06a[,11])
  , sprintf ("%.2f", tabRob06a[,12])
  , paste (sprintf ("%.0f", tabRob06a[,13]), "$|$", sprintf ("%.0f", tabRob06a[,14]), sep="")))

rows <- rep (c ("Governor's", "\\textsc{pj}", "\\textsc{ucr}"), 5)

Header1 <- paste ("\\toprule & \\multicolumn{5}{c}{(a) All provinces} & & \\multicolumn{5}{c}{(b) Small provinces ($\\textsc{m} \\leq 5$)} \\\\ \\cmidrule{2-6} \\cmidrule{8-12} \n")
Header2 <- paste ("\\multicolumn{1}{l}{\\emph{renomination} (0/1)} & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} & & \\multicolumn{1}{c}{est.} & \\multicolumn{1}{c}{95\\% \\textsc{ci}} & \\multicolumn{1}{c}{$p$-val.} & \\multicolumn{1}{c}{bwd.} & \\multicolumn{1}{c}{$\\textsc{n}$} \\\\ \\midrule \n")
Header3 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{legislator (after)} (0/1)} \\\\ \\midrule \n")
Header4 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{executive (after)} (0/1)} \\\\ \\midrule \n")
Header5 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{any office (after)} (0/1)} \\\\ \\midrule \n")
Header6 <- paste ("[1.5ex] \\multicolumn{12}{l}{\\emph{terms served (after)}} \\\\ \\midrule \n")

addtorow <- list()
addtorow$pos <- list()
addtorow$pos[[1]] <- 0
addtorow$pos[[2]] <- 0
addtorow$pos[[3]] <- 3
addtorow$pos[[4]] <- 6
addtorow$pos[[5]] <- 9
addtorow$pos[[6]] <- 12
addtorow$command <- c (Header1, Header2, Header3, Header4, Header5, Header6)
print (xtable (  cbind (rows, tabRob06b)
                 , align=c ("l","l","r","c","c","r","c","c","r","c","c","r","c")
                 , digits=2
                 , caption="Robustness (5): Alternative running variable"
                 , label="T:Rob06titiunik")
       , sanitize.text.function=function(x){x}
       , floating=TRUE
       , table.placement="t"
       , caption.placement="top" 
       , latex.environments="center"
       , size="small"
       , include.colnames=FALSE
       , include.rownames=FALSE
       , hline.after = c ()
       , add.to.row=addtorow, file="TableA18.tex")

sink (NULL)
